Skip to content

Commit

Permalink
fix(shared buffer): shared buffer consistency issue (close risingwave…
Browse files Browse the repository at this point in the history
  • Loading branch information
soundOfDestiny authored Apr 3, 2023
1 parent 4254b42 commit 6f46e4c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/storage/src/hummock/event_handler/uploader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ struct SealedData {
}

impl SealedData {
fn clear(&mut self) {
self.epochs.clear();

self.spilled_data.clear();
self.imms.clear();
}

/// Add the data of a newly sealed epoch.
///
/// Note: it may happen that, for example, currently we hold `imms` and `spilled_data` of epoch
Expand Down Expand Up @@ -615,8 +622,7 @@ impl HummockUploader {
self.max_sealed_epoch = max_committed_epoch;
self.synced_data.clear();
self.syncing_data.clear();
self.sealed_data.spilled_data.clear();
self.sealed_data.imms.clear();
self.sealed_data.clear();
self.unsealed_data.clear();

// TODO: call `abort` on the uploading task join handle
Expand Down

0 comments on commit 6f46e4c

Please sign in to comment.