Skip to content

Commit

Permalink
Speed up object_pruning_test, print TIMEOUT errors in simtest nightly (
Browse files Browse the repository at this point in the history
…MystenLabs#18518)

- Print TIMEOUT errors when test fails
- Shorten minimum pruning tick interval to speed up tests
  • Loading branch information
mystenmark authored Jul 3, 2024
1 parent 4498464 commit 40d083c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion crates/sui-core/src/authority/authority_store_pruner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ pub struct AuthorityStorePruner {
_objects_pruner_cancel_handle: oneshot::Sender<()>,
}

static MIN_PRUNING_TICK_DURATION_MS: u64 = 10 * 1000;

pub struct AuthorityStorePruningMetrics {
pub last_pruned_checkpoint: IntGauge,
pub num_pruned_objects: IntCounter,
Expand Down Expand Up @@ -583,7 +585,7 @@ impl AuthorityStorePruner {
}

fn pruning_tick_duration_ms(epoch_duration_ms: u64) -> u64 {
min(epoch_duration_ms / 2, 60 * 1000)
min(epoch_duration_ms / 2, MIN_PRUNING_TICK_DURATION_MS)
}

fn smoothed_max_eligible_checkpoint_number(
Expand Down
2 changes: 1 addition & 1 deletion scripts/simtest/simtest-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ echo "Failures detected, printing logs..."

# read all filenames in $LOG_DIR that contain the string "FAIL" into a bash array
# and print the line number and filename for each
readarray -t FAILED_LOG_FILES < <(grep -l FAIL "$LOG_DIR"/*)
readarray -t FAILED_LOG_FILES < <(grep -El 'TIMEOUT|FAIL' "$LOG_DIR"/*)

# iterate over the array and print the contents of each file
for LOG_FILE in "${FAILED_LOG_FILES[@]}"; do
Expand Down

0 comments on commit 40d083c

Please sign in to comment.