From 1d6fda478ff2aae625b895327711baccf848565d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cperekopskiy=E2=80=9D?= Date: Thu, 12 Oct 2023 17:11:17 +0300 Subject: [PATCH] Run migration till the end when initting --- core/lib/state/src/rocksdb/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/lib/state/src/rocksdb/mod.rs b/core/lib/state/src/rocksdb/mod.rs index 6ecdf3f0c1d4..cd5bd7b93790 100644 --- a/core/lib/state/src/rocksdb/mod.rs +++ b/core/lib/state/src/rocksdb/mod.rs @@ -185,7 +185,10 @@ impl RocksdbStorage { "Secondary storage for L1 batch #{latest_l1_batch_number} initialized, size is {estimated_size}" ); - self.save_missing_enum_indices(conn).await; + // Enum indices must be at the storage. Run migration till the end. + while self.enum_migration_start_from().is_some() { + self.save_missing_enum_indices(conn).await; + } } async fn apply_storage_logs(