Don't block all requests to switch data
This switchtes the data even if there are requests still running on the old data. osrm-datastore then waits until all of these old requests have finished before freeing the old regions. This also means that osrm-datastore will return with an error if there is a data update currenlty in progress.
This commit is contained in:
committed by
Patrick Niklaus
parent
1557ff81bc
commit
c69545c47a
@@ -7,8 +7,9 @@ int main()
|
||||
{
|
||||
osrm::util::LogPolicy::GetInstance().Unmute();
|
||||
osrm::util::SimpleLogger().Write() << "Releasing all locks";
|
||||
osrm::storage::SharedBarriers barrier;
|
||||
barrier.pending_update_mutex.unlock();
|
||||
barrier.query_mutex.unlock();
|
||||
osrm::storage::SharedBarriers barriers;
|
||||
boost::interprocess::named_upgradable_mutex::remove("current_regions");
|
||||
boost::interprocess::named_sharable_mutex::remove("regions_1");
|
||||
boost::interprocess::named_sharable_mutex::remove("regions_2");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user