Skip to content

Commit

Permalink
fix consistency check (#415)
Browse files Browse the repository at this point in the history
* fix consistency check

* fix first val

* fix

* bump
  • Loading branch information
philsippl authored Sep 19, 2024
1 parent 86f16fe commit bb97421
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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.7.0"
image: "ghcr.io/worldcoin/iris-mpc:v0.7.1"

environment: stage
replicaCount: 1
Expand Down
2 changes: 1 addition & 1 deletion iris-mpc-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ DO UPDATE SET right_code = EXCLUDED.right_code, right_mask = EXCLUDED.right_mask
.await?;

// We also need to reset the sequence to avoid gaps in the IDs.
sqlx::query("SELECT setval(pg_get_serial_sequence('irises', 'id'), $1 + 1)")
sqlx::query("SELECT setval(pg_get_serial_sequence('irises', 'id'), $1 + 1, false)")
.bind(db_len as i64)
.execute(&self.pool)
.await?;
Expand Down
2 changes: 1 addition & 1 deletion iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ async fn server_main(config: Config) -> eyre::Result<()> {
let mut stream = store.stream_irises_par(parallelism).await;
let mut record_counter = 0;
while let Some(iris) = stream.try_next().await? {
if iris.index() > store_len || record_counter != iris.index() - 1 {
if iris.index() > store_len {
tracing::error!("Inconsistent iris index {}", iris.index());
return Err(eyre!("Inconsistent iris index {}", iris.index()));
}
Expand Down

0 comments on commit bb97421

Please sign in to comment.