Skip to content

Commit

Permalink
get version id in each retry
Browse files Browse the repository at this point in the history
  • Loading branch information
wenym1 committed Aug 10, 2024
1 parent 0877926 commit 54778ab
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/meta/src/barrier/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,6 @@ impl GlobalBarrierManager {
///
/// Returns the new state of the barrier manager after recovery.
pub async fn recovery(&mut self, paused_reason: Option<PausedReason>, err: Option<MetaError>) {
let (prev_epoch, version_id) = self
.context
.hummock_manager
.on_current_version(|version| {
(
TracedEpoch::new(Epoch::from(version.max_committed_epoch)),
version.id,
)
})
.await;

// Mark blocked and abort buffered schedules, they might be dirty already.
self.scheduled_barriers
.abort_and_mark_blocked("cluster is under recovering");
Expand Down Expand Up @@ -338,6 +327,17 @@ impl GlobalBarrierManager {
.await
.context("purge state table from hummock")?;

let (prev_epoch, version_id) = self
.context
.hummock_manager
.on_current_version(|version| {
(
TracedEpoch::new(Epoch::from(version.max_committed_epoch)),
version.id,
)
})
.await;

let mut control_stream_manager =
ControlStreamManager::new(self.context.clone());

Expand Down

0 comments on commit 54778ab

Please sign in to comment.