Update pageserver/src/tenant/timeline.rs

Co-authored-by: Joonas Koivunen <joonas@neon.tech>
This commit is contained in:
Konstantin Knizhnik
2023-05-16 21:18:20 +03:00
co-authored by Joonas Koivunen
parent 2d015a1464
commit 3e6288d7d8
+4 -1
View File
@@ -3048,7 +3048,10 @@ impl Timeline {
image_layers.push(image_layer);
}
}
// All wanted layers are taken in account by time_for_new_image_layer
// All wanted layers are taken in account by time_for_new_image_layer.
// The watend_image_layers could get updated out of turn and we could
// clear something which hasn't been looked at all. This is fine, because
// next gc round any wanted would get added back in.
*self.wanted_image_layers.lock().unwrap() = None;
// Sync the new layer to disk before adding it to the layer map, to make sure