Skip to content

Commit

Permalink
only run failed test and add log
Browse files Browse the repository at this point in the history
  • Loading branch information
wenym1 committed Jun 14, 2024
1 parent a2ae282 commit 1e38ac1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 34 deletions.
34 changes: 1 addition & 33 deletions ci/scripts/deterministic-recovery-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,42 +42,10 @@ filter_stack_trace_for_all_logs() {

trap filter_stack_trace_for_all_logs ERR

echo "--- deterministic simulation e2e, ci-3cn-2fe-3meta, recovery, background_ddl"
seq "$TEST_NUM" | parallel MADSIM_TEST_SEED={} './risingwave_simulation \
--kill \
--kill-rate=${KILL_RATE} \
${USE_ARRANGEMENT_BACKFILL:-} \
./e2e_test/background_ddl/sim/basic.slt \
2> $LOGDIR/recovery-background-ddl-{}.log && rm $LOGDIR/recovery-background-ddl-{}.log'

echo "--- deterministic simulation e2e, ci-3cn-2fe-3meta, recovery, ddl"
seq "$TEST_NUM" | parallel MADSIM_TEST_SEED={} './risingwave_simulation \
--kill \
--kill-rate=${KILL_RATE} \
--background-ddl-rate=${BACKGROUND_DDL_RATE} \
${USE_ARRANGEMENT_BACKFILL:-} \
./e2e_test/ddl/\*\*/\*.slt 2> $LOGDIR/recovery-ddl-{}.log && rm $LOGDIR/recovery-ddl-{}.log'

echo "--- deterministic simulation e2e, ci-3cn-2fe-3meta, recovery, streaming"
seq "$TEST_NUM" | parallel MADSIM_TEST_SEED={} './risingwave_simulation \
--kill \
--kill-rate=${KILL_RATE} \
--background-ddl-rate=${BACKGROUND_DDL_RATE} \
${USE_ARRANGEMENT_BACKFILL:-} \
./e2e_test/streaming/\*\*/\*.slt 2> $LOGDIR/recovery-streaming-{}.log && rm $LOGDIR/recovery-streaming-{}.log'

echo "--- deterministic simulation e2e, ci-3cn-2fe-3meta, recovery, batch"
seq "$TEST_NUM" | parallel MADSIM_TEST_SEED={} './risingwave_simulation \
MADSIM_TEST_SEED=4 './risingwave_simulation \
--kill \
--kill-rate=${KILL_RATE} \
--background-ddl-rate=${BACKGROUND_DDL_RATE} \
${USE_ARRANGEMENT_BACKFILL:-} \
./e2e_test/batch/\*\*/\*.slt 2> $LOGDIR/recovery-batch-{}.log && rm $LOGDIR/recovery-batch-{}.log'

echo "--- deterministic simulation e2e, ci-3cn-2fe-3meta, recovery, kafka source,sink"
seq "$TEST_NUM" | parallel MADSIM_TEST_SEED={} './risingwave_simulation \
--kill \
--kill-rate=${KILL_RATE} \
--kafka-datadir=./scripts/source/test_data \
${USE_ARRANGEMENT_BACKFILL:-} \
./e2e_test/source/basic/kafka\*.slt 2> $LOGDIR/recovery-source-{}.log && rm $LOGDIR/recovery-source-{}.log'
11 changes: 10 additions & 1 deletion src/meta/src/hummock/manager/commit_epoch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ pub struct NewTableFragmentInfo {
pub internal_table_ids: Vec<TableId>,
}

#[derive(Debug)]
pub struct CommitEpochInfo {
pub sstables: Vec<ExtendedSstableInfo>,
pub new_table_watermarks: HashMap<TableId, TableWatermarks>,
Expand Down Expand Up @@ -118,6 +119,7 @@ impl HummockManager {
&self,
commit_info: CommitEpochInfo,
) -> Result<Option<HummockSnapshot>> {
let commit_info_string = format!("{:?}", commit_info);
let CommitEpochInfo {
mut sstables,
new_table_watermarks,
Expand All @@ -128,6 +130,7 @@ impl HummockManager {
max_committed_epoch: epoch,
} = commit_info;
let mut versioning_guard = self.versioning.write().await;
let before_version = versioning_guard.current_version.clone();
let _timer = start_measure_real_process_timer!(self, "commit_epoch");
// Prevent commit new epochs if this flag is set
if versioning_guard.disable_commit_epochs {
Expand Down Expand Up @@ -398,7 +401,13 @@ impl HummockManager {
.keys()
.cloned()
.collect()
)
),
"commit_info: {} \
before_version: {:?} \
after_version: {:?}",
commit_info_string,
before_version,
version.latest_version()
);

// Apply stats changes.
Expand Down

0 comments on commit 1e38ac1

Please sign in to comment.