Skip to content
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

Feature/datasharing custom path [12051] #2092

Merged
merged 11 commits into from
Sep 1, 2021

Conversation

IkerLuengo
Copy link
Contributor

No description provided.

@IkerLuengo IkerLuengo force-pushed the feature/datasharing_custom_path branch from ec89d33 to 3b03ad0 Compare July 26, 2021 13:24
@MiguelCompany MiguelCompany added this to the v2.4.0 milestone Jul 28, 2021
@IkerLuengo IkerLuengo force-pushed the feature/datasharing_custom_path branch from 6588fe7 to a7fd9bd Compare July 28, 2021 08:21
@fujitatomoya
Copy link
Contributor

@Barry-Xu-2018 could you update the result from trial? thanks in advance.

@Barry-Xu-2018
Copy link
Contributor

I have tried this PR.
Specified shared memory path can work correctly.

After specify shared_dir in configuration file and execute, I can find

$ ls /mnt/my_shm/   # Shared memory for data sharing is created in specified path
fast_datasharing_01.0f.eb.7d.04.18.1e.44.01.00.00.00_0.0.12.3 fast_datasharing_01.0f.eb.7d.10.18.f0.37.01.00.00.00_0.0.12.4

$ ls /dev/shm/   # Other control information is located at /dev/shm 
fastrtps_6e619c2c4a9ed965     fastrtps_a573b851cb1ef566_el  fastrtps_port7413     fastrtps_port7414_el  sem.fastrtps_port7412_mutex  sem.fastrtps_port7415_mutex
fastrtps_6e619c2c4a9ed965_el  fastrtps_port7412             fastrtps_port7413_el  fastrtps_port7415     sem.fastrtps_port7413_mutex
fastrtps_a573b851cb1ef566     fastrtps_port7412_el          fastrtps_port7414     fastrtps_port7415_el  sem.fastrtps_port7414_mutex

@IkerLuengo
Copy link
Contributor Author

@Barry-Xu-2018 @fujitatomoya

Just for clarification, the files that can still be found in /dev/shm are related to the SharedMemory transport, and not to the DataSharing. This is as designed, since we left the shared memory transport as it was, using the standard shared memory configuration.

@IkerLuengo IkerLuengo force-pushed the feature/datasharing_custom_path branch from bdc5d2e to f7e469d Compare August 19, 2021 13:15
@fujitatomoya
Copy link
Contributor

@IkerLuengo

thanks for the comments, so we can actually ignore those files under /dev/shm for Data Sharing, is that correct. (just checking and reconfirmation.)

@IkerLuengo
Copy link
Contributor Author

@fujitatomoya
Yes, those appear because the shared memory transport is always on by default.
Files related to data sharing all have the pattern fast_datasharing_.*. The bunch of numbers following is the GUID of the endpoint. There should be one for each datawriter (for sharing the messages) and datareader (for notifications).

@IkerLuengo
Copy link
Contributor Author

@richiprosima please test windows

@IkerLuengo
Copy link
Contributor Author

Checked the failing tests. Errors are not related to the changes.

Windows job seems to be unstable and fails a lot due to cmd.exe failing during configuration of foonathan. However, we have complete results for each toolset on separate consecutive runs:

@MiguelCompany
Copy link
Member

@richiprosima Please test this

MiguelCompany
MiguelCompany previously approved these changes Aug 30, 2021
IkerLuengo and others added 11 commits August 31, 2021 09:51
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
Define two new classes:
- SharedMemSegment is the same as before, using the BOOST shared memory.
- SharedFileSegment uses BOOST memory mapped files.

They both are specializations of a template class SharedSegment, which
has a base class SharedSegmentBase.

The idea is for DataSharing objects to hold a pointer to
SharedSegmentBase that will be initialized as SharedMemSegment or
SharedFileSegment depending on the configuration.

At this point no changes have been done to the users of these classes,
as they are already using SharedMemSegment

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
@IkerLuengo IkerLuengo force-pushed the feature/datasharing_custom_path branch from f7e469d to add6067 Compare August 31, 2021 07:53
@MiguelCompany MiguelCompany merged commit fdad27a into master Sep 1, 2021
@MiguelCompany MiguelCompany deleted the feature/datasharing_custom_path branch September 1, 2021 05:33
SamuelWHalodi pushed a commit to SamuelWHalodi/Fast-DDS that referenced this pull request Oct 4, 2021
* Refs 12051. New boost headers for file mapping

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Refs 12051. Testing for custom directories

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Refs 12051. Define file and memory shared segments

Define two new classes:
- SharedMemSegment is the same as before, using the BOOST shared memory.
- SharedFileSegment uses BOOST memory mapped files.

They both are specializations of a template class SharedSegment, which
has a base class SharedSegmentBase.

The idea is for DataSharing objects to hold a pointer to
SharedSegmentBase that will be initialized as SharedMemSegment or
SharedFileSegment depending on the configuration.

At this point no changes have been done to the users of these classes,
as they are already using SharedMemSegment

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Refs 12051. Datasharing to use files if path configured

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Correct the removal of the shared object

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Refs 12051. linters

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Refs 12051. Correct unit test

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Refs 12051. Fix warnings on Windows

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Refs 12051. Keep old API and move templatized init

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Removed semicolon

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 12051. Notification can be file shared too

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Samuel Wilhelmsson <samuel@halodi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants