-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: logs might be missed during RegionBased replay in the WAL based …
…on local disk (#1570) ## Rationale In RegionBased replay, a batch of logs is first scanned from the WAL, and then replayed on various tables using multiple threads. This approach works fine for WALs based on tables, as the logs for each table are clustered together. However, in a WAL based on local disk, the logs for each table may be scattered across different positions within the batch. During multi-threaded replay, it is possible that for a given table, log2 is replayed before log1, resulting in missed logs. ## Detailed Changes 1. Modify `split_log_batch_by_table` function to aggregate all logs for a table together. 2. Modify `tableBatch` struct to change a single range into a `Vec<Range>`. ## Test Plan Manual testing.
- Loading branch information
1 parent
42baf2e
commit 559dfce
Showing
1 changed file
with
24 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters