Skip to content

Commit

Permalink
fix: directly return when found no table datas to replay (#1062)
Browse files Browse the repository at this point in the history
## Rationale
Now it will still scan logs from wal when no table datas needed to
replay, it should directly return actually.

## Detailed Changes
Add a fast path to return directly when no table datas needed to replay.

## Test Plan
Test manually.
  • Loading branch information
Rachelint authored Jul 11, 2023
1 parent 96bf852 commit 3dcf83b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions analytic_engine/src/instance/open.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,15 @@ impl ShardOpener {
}
}

if replay_table_datas.is_empty() {
info!(
"ShardOpener recover empty table datas finish, shard_id:{}",
self.shard_id
);

return Ok(());
}

let replay_mode = match self.recover_mode {
RecoverMode::TableBased => ReplayMode::TableBased,
RecoverMode::ShardBased => ReplayMode::RegionBased,
Expand Down

0 comments on commit 3dcf83b

Please sign in to comment.