shm: ensure local segments are complete for region subscriptions

This commit is contained in:
Alexey Rybalchenko 2020-11-25 13:29:56 +01:00
parent bb1ce794b6
commit db0937f339

View File

@ -367,6 +367,9 @@ class Manager
}
for (const auto& e : *fShmSegments) {
// make sure any segments in the session are found
GetSegment(e.first);
try {
fair::mq::RegionInfo info;
info.managed = true;
info.id = e.first;
@ -374,6 +377,10 @@ class Manager
info.ptr = boost::apply_visitor(SegmentAddress{}, fSegments.at(e.first));
info.size = boost::apply_visitor(SegmentSize{}, fSegments.at(e.first));
result.push_back(info);
} catch (const std::out_of_range& oor) {
LOG(error) << "could not find segment with id " << e.first;
LOG(error) << oor.what();
}
}
return result;
@ -474,7 +481,7 @@ class Manager
try {
// get region info
SegmentInfo segmentInfo = fShmSegments->at(id);
LOG(info) << "LOCATED SEGMENT WITH ID '" << id << "'";
LOG(debug) << "Located segment with id '" << id << "'";
using namespace boost::interprocess;