mirror: Don't start migrating until the allocation map is built
There is a fun race that can happen if we begin migrating while the allocation map is still building. We call bitset_enable_stream() when the migration begins, which causes the builder to start putting events into the stream. This is bad all by itself, as it slows the migration down for no reason, but the stream is a limited-size queue and there are situations (migration fails and is restarted) where we can end up with the queue full and nobody able to empty it, freezing the whole thing.
This commit is contained in:
@@ -686,6 +686,7 @@ void* build_allocation_map_thread(void* serve_uncast)
|
||||
* the future, we'll need to wait for the allocation map to finish or
|
||||
* fail before we can complete the migration.
|
||||
*/
|
||||
serve->allocation_map_not_built = 1;
|
||||
warn( "Didn't build allocation map for %s", serve->filename );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user