Skip to content

Commit 020a87b

Browse files
committed
bugfix
1 parent 1df6aaa commit 020a87b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

turbopack/crates/turbo-persistence/src/write_batch.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ pub struct WriteBatch<K: StoreKey + Send, const FAMILIES: usize> {
6262
/// The list of new SST files that have been created.
6363
/// Tuple of (sequence number, file).
6464
new_sst_files: Mutex<Vec<(u32, File)>>,
65-
/// Collectors are are current unused, but have memory preallocated.
65+
/// Collectors that are currently unused, but have memory preallocated.
6666
idle_collectors: Mutex<Vec<Collector<K>>>,
67-
/// Collectors are are current unused, but have memory preallocated.
67+
/// Collectors that are currently unused, but have memory preallocated.
6868
idle_thread_local_collectors: Mutex<Vec<Collector<K, THREAD_LOCAL_SIZE_SHIFT>>>,
6969
}
7070

@@ -180,7 +180,6 @@ impl<K: StoreKey + Send + Sync, const FAMILIES: usize> WriteBatch<K, FAMILIES> {
180180
/// Finishes the write batch by returning the new sequence number and the new SST files. This
181181
/// writes all outstanding thread local data to disk.
182182
pub(crate) fn finish(&mut self) -> Result<FinishResult> {
183-
let mut new_sst_files = take(self.new_sst_files.get_mut());
184183
let mut new_blob_files = Vec::new();
185184
let shared_error = Mutex::new(Ok(()));
186185

@@ -215,6 +214,7 @@ impl<K: StoreKey + Send + Sync, const FAMILIES: usize> WriteBatch<K, FAMILIES> {
215214
});
216215

217216
// Now we reduce the global collectors in parallel
217+
let mut new_sst_files = take(self.new_sst_files.get_mut());
218218
let shared_new_sst_files = Mutex::new(&mut new_sst_files);
219219

220220
let collectors = replace(

0 commit comments

Comments
 (0)