mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
shm: ensure local segments are complete for region subscriptions
This commit is contained in:
parent
bb1ce794b6
commit
db0937f339
|
@ -367,6 +367,9 @@ class Manager
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& e : *fShmSegments) {
|
for (const auto& e : *fShmSegments) {
|
||||||
|
// make sure any segments in the session are found
|
||||||
|
GetSegment(e.first);
|
||||||
|
try {
|
||||||
fair::mq::RegionInfo info;
|
fair::mq::RegionInfo info;
|
||||||
info.managed = true;
|
info.managed = true;
|
||||||
info.id = e.first;
|
info.id = e.first;
|
||||||
|
@ -374,6 +377,10 @@ class Manager
|
||||||
info.ptr = boost::apply_visitor(SegmentAddress{}, fSegments.at(e.first));
|
info.ptr = boost::apply_visitor(SegmentAddress{}, fSegments.at(e.first));
|
||||||
info.size = boost::apply_visitor(SegmentSize{}, fSegments.at(e.first));
|
info.size = boost::apply_visitor(SegmentSize{}, fSegments.at(e.first));
|
||||||
result.push_back(info);
|
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;
|
return result;
|
||||||
|
@ -474,7 +481,7 @@ class Manager
|
||||||
try {
|
try {
|
||||||
// get region info
|
// get region info
|
||||||
SegmentInfo segmentInfo = fShmSegments->at(id);
|
SegmentInfo segmentInfo = fShmSegments->at(id);
|
||||||
LOG(info) << "LOCATED SEGMENT WITH ID '" << id << "'";
|
LOG(debug) << "Located segment with id '" << id << "'";
|
||||||
|
|
||||||
using namespace boost::interprocess;
|
using namespace boost::interprocess;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user