From ebad60175cc39c111b4a181d7191b84c1a995b98 Mon Sep 17 00:00:00 2001 From: Alex Siegel Date: Thu, 16 May 2024 21:32:55 +0000 Subject: [PATCH] asiegel/load-funk-wksp: fixing banks recovery --- src/app/fdctl/run/tiles/fd_replay.c | 5 +---- src/flamenco/runtime/fd_runtime.c | 7 +++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/app/fdctl/run/tiles/fd_replay.c b/src/app/fdctl/run/tiles/fd_replay.c index a7a199a8cf..1ef8da3317 100644 --- a/src/app/fdctl/run/tiles/fd_replay.c +++ b/src/app/fdctl/run/tiles/fd_replay.c @@ -360,10 +360,7 @@ read_snapshot( void * _ctx, char const * snapshotfile, char const * incremental ctx->epoch_ctx = fd_exec_epoch_ctx_join( fd_exec_epoch_ctx_new( ctx->epoch_ctx_mem, 2000000UL ) ); fd_snapshot_load(incremental, ctx->slot_ctx, false, false, FD_SNAPSHOT_TYPE_INCREMENTAL ); } else { - /* This is called at the bottom of fd_snapshot_load */ - fd_funk_start_write(ctx->acc_mgr->funk); - fd_hashes_load(ctx->slot_ctx); - fd_funk_end_write(ctx->acc_mgr->funk); + fd_runtime_recover_banks( ctx->slot_ctx, 0 ); } } else { diff --git a/src/flamenco/runtime/fd_runtime.c b/src/flamenco/runtime/fd_runtime.c index f773684cc8..9153fbd5cd 100644 --- a/src/flamenco/runtime/fd_runtime.c +++ b/src/flamenco/runtime/fd_runtime.c @@ -2203,7 +2203,7 @@ fd_runtime_checkpt( fd_capture_ctx_t * capture_ctx, fd_exec_slot_ctx_t * slot_ctx, ulong slot ) { int is_checkpt_freq = capture_ctx != NULL && slot % capture_ctx->checkpt_freq == 0; - int is_abort_slot = slot == ULONG_MAX; + int is_abort_slot = slot == ULONG_MAX; if( !is_checkpt_freq && !is_abort_slot ) { return; } @@ -2281,7 +2281,7 @@ fd_runtime_block_eval_tpool(fd_exec_slot_ctx_t *slot_ctx, if( err != 0 ) { return err; } - + fd_funk_t * funk = slot_ctx->acc_mgr->funk; long block_eval_time = -fd_log_wallclock(); @@ -3600,8 +3600,7 @@ FD_SCRATCH_SCOPE_BEGIN { fd_funk_rec_key_t id = fd_runtime_epoch_bank_key(); fd_funk_rec_t const * rec = fd_funk_rec_query_global(funk, txn, &id); if ( rec == NULL ) - __asm__("int $3"); - // FD_LOG_ERR(("failed to read banks record")); + FD_LOG_ERR(("failed to read banks record")); void * val = fd_funk_val( rec, fd_funk_wksp(funk) ); fd_bincode_decode_ctx_t ctx; ctx.data = val;