Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikeW committed Apr 28, 2024
1 parent a9996d7 commit afe3bd1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions src/compute/tests/cdc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ use risingwave_stream::executor::monitor::StreamingMetrics;
use risingwave_stream::executor::test_utils::MockSource;
use risingwave_stream::executor::{
expect_first_barrier, ActorContext, AddMutation, Barrier, BoxedMessageStream,
CdcBackfillExecutor, Execute, Executor as StreamExecutor, ExecutorInfo, ExternalStorageTable,
MaterializeExecutor, Message, Mutation, StreamExecutorError,
CdcBackfillExecutor, CdcScanOptions, Execute, Executor as StreamExecutor, ExecutorInfo,
ExternalStorageTable, MaterializeExecutor, Message, Mutation, StreamExecutorError,
};

// mock upstream binlog offset starting from "1.binlog, pos=0"
Expand Down Expand Up @@ -230,8 +230,11 @@ async fn test_cdc_backfill() -> StreamResult<()> {
state_table,
Some(4), // limit a snapshot chunk to have <= 4 rows by rate limit
false,
1,
4,
Some(CdcScanOptions {
disable_backfill: false,
snapshot_interval: 1,
snapshot_batch_size: 4,
}),
)
.boxed(),
);
Expand Down
6 changes: 3 additions & 3 deletions src/stream/src/executor/backfill/cdc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ pub use upstream_table::external::ExternalStorageTable;
#[derive(Debug, Clone)]
pub struct CdcScanOptions {
/// Whether to disable backfill
disable_backfill: bool,
pub disable_backfill: bool,
/// Barreir interval to start a new snapshot read
snapshot_interval: u32,
pub snapshot_interval: u32,
/// Batch size for a snapshot read query
snapshot_batch_size: u32,
pub snapshot_batch_size: u32,
}

impl Default for CdcScanOptions {
Expand Down

0 comments on commit afe3bd1

Please sign in to comment.