From 0607c23f0b3df03880274273e9e1c7d426962f50 Mon Sep 17 00:00:00 2001 From: danielle-tfh Date: Tue, 14 Jan 2025 15:47:44 +0100 Subject: [PATCH] [temp] stage increase DB size in staging --- .github/workflows/temp-branch-build-and-push.yaml | 2 +- iris-mpc-store/src/lib.rs | 3 ++- iris-mpc/src/bin/server.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/temp-branch-build-and-push.yaml b/.github/workflows/temp-branch-build-and-push.yaml index 00cee77d4..34f0979ae 100644 --- a/.github/workflows/temp-branch-build-and-push.yaml +++ b/.github/workflows/temp-branch-build-and-push.yaml @@ -3,7 +3,7 @@ name: Branch - Build and push docker image on: push: branches: - - "feat/even-odd-import-from-s3" + - "staging-fill-db-size" concurrency: group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' diff --git a/iris-mpc-store/src/lib.rs b/iris-mpc-store/src/lib.rs index 46841ee16..0d6cfeff9 100644 --- a/iris-mpc-store/src/lib.rs +++ b/iris-mpc-store/src/lib.rs @@ -445,6 +445,7 @@ DO UPDATE SET right_code = EXCLUDED.right_code, right_mask = EXCLUDED.right_mask rng_seed: u64, party_id: usize, db_size: usize, + store_len: usize, clear_db_before_init: bool, ) -> Result<()> { let mut rng = StdRng::seed_from_u64(rng_seed); @@ -461,7 +462,7 @@ DO UPDATE SET right_code = EXCLUDED.right_code, right_mask = EXCLUDED.right_mask "DB size before initialization: {}", self.count_irises().await? ); - for i in 0..db_size { + for i in store_len..db_size { if (i % 1000) == 0 { tracing::info!("Initializing iris db: Generated {} entries", i); } diff --git a/iris-mpc/src/bin/server.rs b/iris-mpc/src/bin/server.rs index 2ba9c657c..760d67cb7 100644 --- a/iris-mpc/src/bin/server.rs +++ b/iris-mpc/src/bin/server.rs @@ -726,7 +726,7 @@ async fn server_main(config: Config) -> eyre::Result<()> { // Seed the persistent storage with random shares if configured and db is still // empty. - if store_len == 0 && config.init_db_size > 0 { + if config.init_db_size > 0 && store_len < config.init_db_size { tracing::info!( "Initialize persistent iris DB with {} randomly generated shares", config.init_db_size