-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iox-#2128 Support segment name configuration #1
base: iox-#2128-segment-mapping-design
Are you sure you want to change the base?
Iox-#2128 Support segment name configuration #1
Conversation
8783545
to
6b6914a
Compare
53ad6ab
to
1dcc846
Compare
9879ce4
to
0018fc2
Compare
@@ -1,4 +1,5 @@ | |||
// Copyright (c) 2019 by Robert Bosch GmbH. All rights reserved. | |||
// Copyright (c) 2023 by Latitude AI. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Copyright (c) 2023 by Latitude AI. All rights reserved. | |
// Copyright (c) 2024 by Latitude AI. All rights reserved. |
PosixGroup::groupName_t(iox::TruncateToCapacity, writer.c_str(), writer.size()), | ||
mempoolConfig}); | ||
parsedConfig.m_sharedMemorySegments.emplace_back( | ||
ShmName_t(iox::TruncateToCapacity, name.c_str(), name.size()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care if the name gets truncated? I'm wondering about cases where we have two or more segments with names that are too long, but whose prefixes match up to the point where they are truncated, like:
a_really_long_name_for_a_segment_that_is_idential_up_to_here
a_really_long_name_for_a_segment_that_is_idential_up_to_there
But maybe the truncation of both just yields: a_really_long_name_for_a_segment_that_is_idential_up_to_
and we have a weird name conflict which is not apparent by reading the config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is kind of an annoying point. FWIW in the next PR I replace the "multiple writers" error with a "duplicate segment name" error which causes the program to crash. You get an informative error message. As you will see it could probably be handled more close to the config parsing better but I'm trying to balance locality of changes vs taking on larger refactoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume there are also going to be weird errors if the writer/reader groups are too large.
I might poke around a bit at adding a config-time check for the length of these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah makes sense and I don't expect we'll encounter the string size limit as a problem all that often anyway.
0018fc2
to
5410bc9
Compare
1dcc846
to
085e8b6
Compare
5410bc9
to
2d15256
Compare
Pre-Review Checklist for the PR Author
iox-123-this-is-a-branch
)iox-#123 commit text
)task-list-completed
)iceoryx_hoofs
are added to./clang-tidy-diff-scans.txt
Notes for Reviewer
One of several Pull Requests implementing the design described in https://github.com/eclipse-iceoryx/iceoryx/pull/2140/files?short_path=b929aa6#diff-b929aa69d30dd941515f8c2d7e162051113bede6fa3b4a06e1aa4693279ce3b8 and resolving issue eclipse-iceoryx#2128
Checklist for the PR Reviewer
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
Post-review Checklist for the PR Author
References