From 54878658380dcb3a6760564b8365fde1a521251a Mon Sep 17 00:00:00 2001 From: ramfox Date: Tue, 17 Dec 2024 08:18:30 +0000 Subject: [PATCH] deploy: 90482983fe849dafd7ff53700fd1f3cfe9035523 --- pr/23/docs/iroh_docs/sync/index.html | 2 +- pr/23/docs/src/iroh_docs/store/fs.rs.html | 6 +-- pr/23/docs/src/iroh_docs/sync.rs.html | 46 +++++++++++++++++------ 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/pr/23/docs/iroh_docs/sync/index.html b/pr/23/docs/iroh_docs/sync/index.html index 2832b4b..cb930a3 100644 --- a/pr/23/docs/iroh_docs/sync/index.html +++ b/pr/23/docs/iroh_docs/sync/index.html @@ -1,3 +1,3 @@ -iroh_docs::sync - Rust
iroh_docs

Module sync

Source
Expand description

API for iroh-docs replicas

+iroh_docs::sync - Rust
iroh_docs

Module sync

Source
Expand description

API for iroh-docs replicas

Structs§

Enums§

Constants§

Type Aliases§

  • Callback that may be set on a replica to determine the availability status for a content hash.
  • Byte representation of a PeerId from iroh-net.
  • Protocol message for the set reconciliation protocol.
\ No newline at end of file diff --git a/pr/23/docs/src/iroh_docs/store/fs.rs.html b/pr/23/docs/src/iroh_docs/store/fs.rs.html index ef21a54..5ddd7fe 100644 --- a/pr/23/docs/src/iroh_docs/store/fs.rs.html +++ b/pr/23/docs/src/iroh_docs/store/fs.rs.html @@ -2265,7 +2265,7 @@ .collect::<Result<Vec<_>>>()?; assert_eq!(expected, actual); - + store.flush()?; Ok(()) } @@ -2282,8 +2282,8 @@ } // TODO: write test checking that the indexing is done correctly - - Ok(()) + store.flush()?; + Ok(()) } }
\ No newline at end of file diff --git a/pr/23/docs/src/iroh_docs/sync.rs.html b/pr/23/docs/src/iroh_docs/sync.rs.html index bb7be19..4d3558c 100644 --- a/pr/23/docs/src/iroh_docs/sync.rs.html +++ b/pr/23/docs/src/iroh_docs/sync.rs.html @@ -2546,7 +2546,19 @@ 2545 2546 2547 -2548
//! API for iroh-docs replicas
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
//! API for iroh-docs replicas
 
 // Names and concepts are roughly based on Willows design at the moment:
 //
@@ -3906,7 +3918,9 @@
         assert_eq!(entries_second.len(), 12);
         assert_eq!(entries, entries_second.into_iter().collect::<Vec<_>>());
 
-        test_lru_cache_like_behaviour(&mut store, myspace.id())
+        test_lru_cache_like_behaviour(&mut store, myspace.id())?;
+        store.flush()?;
+        Ok(())
     }
 
     /// Test that [`Store::register_useful_peer`] behaves like a LRUCache of size
@@ -4133,7 +4147,7 @@
             .get_exact(namespace.id(), author.id(), key, false)?
             .unwrap();
         assert_eq!(res, entry);
-
+        store.flush()?;
         Ok(())
     }
 
@@ -4185,7 +4199,8 @@
         check_entries(&mut alice_store, &myspace.id(), &author, &bob_set)?;
         check_entries(&mut bob_store, &myspace.id(), &author, &alice_set)?;
         check_entries(&mut bob_store, &myspace.id(), &author, &bob_set)?;
-
+        alice_store.flush()?;
+        bob_store.flush()?;
         Ok(())
     }
 
@@ -4248,7 +4263,8 @@
             get_content_hash(&mut alice_store, namespace.id(), author.id(), key)?,
             Some(alice_hash_2)
         );
-
+        alice_store.flush()?;
+        bob_store.flush()?;
         Ok(())
     }
 
@@ -4306,7 +4322,7 @@
             get_entry(&mut store, namespace.id(), author.id(), key)?,
             entry2
         );
-
+        store.flush()?;
         Ok(())
     }
 
@@ -4320,6 +4336,7 @@
         let hash = Hash::new(b"");
         let res = replica.insert(b"foo", &alice, hash, 0);
         assert!(matches!(res, Err(InsertError::EntryIsEmpty)));
+        store.flush()?;
         Ok(())
     }
 
@@ -4372,7 +4389,7 @@
             store.get_exact(myspace.id(), alice.id(), b"foo", false)?,
             None
         );
-
+        store.flush()?;
         Ok(())
     }
 
@@ -4424,7 +4441,8 @@
         sync(&mut alice, &mut bob)?;
         check_entries(&mut alice_store, &myspace.id(), &author, &["fog", "fooz"])?;
         check_entries(&mut bob_store, &myspace.id(), &author, &["fog", "fooz"])?;
-
+        alice_store.flush()?;
+        bob_store.flush()?;
         Ok(())
     }
 
@@ -4476,6 +4494,7 @@
             .get_many(namespace.id(), Query::all())?
             .collect::<Vec<_>>();
         assert_eq!(res.len(), 1);
+        store.flush()?;
         Ok(())
     }
 
@@ -4542,6 +4561,7 @@
             namespace.id(),
             vec![vec![1u8, 0u8], vec![1u8, 2u8]],
         );
+        store.flush()?;
         Ok(())
     }
 
@@ -4581,7 +4601,7 @@
         let mut latest_keys: Vec<Vec<u8>> = latest.iter().map(|r| r.2.to_vec()).collect();
         latest_keys.sort();
         assert_eq!(latest_keys, vec![b"a0.2".to_vec(), b"a1.1".to_vec()]);
-
+        store.flush()?;
         Ok(())
     }
 
@@ -4631,6 +4651,7 @@
             namespace.id(),
             vec![vec![1u8, 0u8], vec![1u8, 2u8], vec![0u8, 255u8]],
         );
+        store.flush()?;
         Ok(())
     }
 
@@ -4678,6 +4699,7 @@
         let mut replica = store.open_replica(&namespace.id())?;
         let res = replica.hash_and_insert(b"foo", &author, b"bar");
         assert!(res.is_ok());
+        store.flush()?;
         Ok(())
     }
 
@@ -4794,7 +4816,8 @@
         assert_eq!(state1.num_recv, 0);
         assert_eq!(state2.num_sent, 0);
         assert_eq!(state2.num_recv, 1);
-
+        store1.flush()?;
+        store2.flush()?;
         Ok(())
     }
 
@@ -4984,7 +5007,7 @@
                 ("hi", &a3),
             ],
         );
-
+        store.flush()?;
         Ok(())
     }
 
@@ -5018,6 +5041,7 @@
         store.set_download_policy(&id, policy.clone())?;
         let retrieved_policy = store.get_download_policy(&id)?;
         assert_eq!(retrieved_policy, policy);
+        store.flush()?;
         Ok(())
     }