Skip to content

Commit ec1baa3

Browse files
backtest: start reading shreds after full snapshot load
1 parent 8f33f19 commit ec1baa3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/disco/archiver/fd_archiver_backtest.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ rocksdb_inspect( fd_archiver_backtest_tile_ctx_t * ctx,
6161
do {
6262
if( FD_UNLIKELY( fd_rocksdb_root_iter_next( &ctx->rocksdb_root_iter, &ctx->rocksdb_slot_meta, ctx->valloc ) ) ) break;
6363
if( FD_UNLIKELY( fd_rocksdb_get_meta( &ctx->rocksdb, ctx->rocksdb_slot_meta.slot, &ctx->rocksdb_slot_meta, ctx->valloc ) ) ) break;
64+
if( FD_UNLIKELY( ctx->rocksdb_slot_meta.slot>ctx->playback_end_slot ) ) break;
6465
ulong slot = ctx->rocksdb_slot_meta.slot;
6566
ulong start_idx = 0;
6667
ulong end_idx = ctx->rocksdb_slot_meta.received;
@@ -196,6 +197,7 @@ after_credit( fd_archiver_backtest_tile_ctx_t * ctx,
196197
if( FD_UNLIKELY( !ctx->playback_started ) ) {
197198
ulong wmark = fd_fseq_query( ctx->published_wmark );
198199
if( wmark==ULONG_MAX ) return;
200+
if( wmark!=ctx->replay_notification.slot_exec.slot ) return;
199201

200202
ctx->playback_started=1;
201203
fd_rocksdb_root_iter_new( &ctx->rocksdb_root_iter );

0 commit comments

Comments
 (0)