Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy-fdu committed Mar 7, 2024
1 parent 6c4aff9 commit e271f7a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Binary file modified risingwave-test/hummock_001/checkpoint/0
Binary file not shown.
5 changes: 2 additions & 3 deletions src/storage/src/hummock/event_handler/uploader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,6 @@ mod tests {
use crate::opts::StorageOpts;
use crate::storage_value::StorageValue;

const BASIC_EPOCH: HummockEpoch = test_epoch(4);
const INITIAL_EPOCH: HummockEpoch = test_epoch(5);
const TEST_TABLE_ID: TableId = TableId { table_id: 233 };

Expand All @@ -1231,7 +1230,7 @@ mod tests {
}

fn initial_pinned_version() -> PinnedVersion {
PinnedVersion::new(test_hummock_version(BASIC_EPOCH), unbounded_channel().0)
PinnedVersion::new(test_hummock_version(INITIAL_EPOCH), unbounded_channel().0)
}

fn dummy_table_key() -> Vec<u8> {
Expand Down Expand Up @@ -1404,7 +1403,7 @@ mod tests {
#[tokio::test]
async fn test_uploader_basic() {
let mut uploader = test_uploader(dummy_success_upload_future);
let epoch1 = INITIAL_EPOCH;
let epoch1 = INITIAL_EPOCH.next_epoch();
let imm = gen_imm(epoch1).await;
uploader.add_imm(imm.clone());
assert_eq!(1, uploader.unsealed_data.len());
Expand Down
2 changes: 2 additions & 0 deletions src/stream/tests/integration_tests/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ fn run_until_pending(
}
SnapshotEvent::Chunk(output)
}
// The epoch value in the input is randomly chosen (e.g., 1, 2, 3), but during the actual processing, it undergoes a left shift.
// In order to ensure consistency between the input and output when comparing with the script, the epoch value in the output needs to be correspondingly right-shifted.
Message::Barrier(barrier) => SnapshotEvent::Barrier(barrier.epoch.curr / test_epoch(1)),
Message::Watermark(watermark) => SnapshotEvent::Watermark {
col_idx: watermark.col_idx,
Expand Down

0 comments on commit e271f7a

Please sign in to comment.