Skip to content

Commit

Permalink
parse iris
Browse files Browse the repository at this point in the history
  • Loading branch information
eaypek-tfh committed Jan 20, 2025
1 parent a9497b3 commit 4c211d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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:4290e654ac66191af6eb3327c3980854257644ab"
image: "ghcr.io/worldcoin/iris-mpc:544e539d0ef726cf126477c28a7559de0589db33"

environment: stage
replicaCount: 1
Expand Down
8 changes: 5 additions & 3 deletions iris-mpc-store/src/s3_importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ pub async fn fetch_to_memory(
let mut handles: Vec<task::JoinHandle<Result<(), eyre::Error>>> = Vec::new();
let mut active_handles = 0;
let range_size = MAX_RANGE_SIZE;
let single_range_bytes = range_size * SINGLE_ELEMENT_SIZE;
for chunk in (1..=last_snapshot_details.last_serial_id).step_by(range_size) {
let chunk_id =
(chunk / last_snapshot_details.chunk_size) * last_snapshot_details.chunk_size + 1;
Expand All @@ -338,7 +337,7 @@ pub async fn fetch_to_memory(

handles.push(task::spawn({
let store = Arc::clone(&store); // Clone the Arc to share ownership
let mut slice = vec![0u8; single_range_bytes];
let mut slice = vec![0u8; SINGLE_ELEMENT_SIZE];
async move {
let mut result = store
.get_object(
Expand All @@ -354,7 +353,10 @@ pub async fn fetch_to_memory(
loop {
match result.read_exact(&mut slice).await {
Ok(_) => {
// left blank
let iris = S3StoredIris::from_bytes(&slice)?;
if iris.id % 10000 == 0 {
tracing::info!("Fetched iris with id: {}", iris.id);
}
}
Err(e) if e.kind() == std::io::ErrorKind::UnexpectedEof => break,
Err(e) => return Err(e.into()),
Expand Down

0 comments on commit 4c211d1

Please sign in to comment.