Skip to content

Commit

Permalink
Ps/fix/main (#393)
Browse files Browse the repository at this point in the history
* fix main

* bump
  • Loading branch information
philsippl authored Sep 17, 2024
1 parent 57a3464 commit ed7c6a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deploy/stage/common-values-iris-mpc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: "ghcr.io/worldcoin/iris-mpc:v0.6.6"
image: "ghcr.io/worldcoin/iris-mpc:v0.6.7"

environment: stage
replicaCount: 1
Expand Down
13 changes: 6 additions & 7 deletions iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,19 +540,16 @@ async fn server_main(config: Config) -> eyre::Result<()> {

let store_len = store.count_irises().await?;

tracing::info!(format!(
"Size of the database during startup: {}",
store_len
));
tracing::info!("Size of the database before init: {}", store_len);

// Seed the persistent storage with random shares if configured and db is still
// empty.
if store_len == 0 && config.init_db_size > 0 {
tracing::info!(format!(
tracing::info!(
"Initialize persistent iris DB with {} randomly generated shares",
config.init_db_size
));
tracing::info!(format!("Resetting the db: {}", config.clear_db_before_init));
);
tracing::info!("Resetting the db: {}", config.clear_db_before_init);
store
.init_db_with_random_shares(
RNG_SEED_INIT_DB,
Expand All @@ -566,6 +563,8 @@ async fn server_main(config: Config) -> eyre::Result<()> {
// Fetch again in case we've just initialized the DB
let store_len = store.count_irises().await?;

tracing::info!("Size of the database after init: {}", store_len);

if store_len > MAX_DB_SIZE {
tracing::error!("Database size exceeds maximum allowed size: {}", store_len);
eyre::bail!("Database size exceeds maximum allowed size: {}", store_len);
Expand Down

0 comments on commit ed7c6a2

Please sign in to comment.