Skip to content

Commit 75864bc

Browse files
committed
Merge branch 'entity-manager' into lightweight-watcher
2 parents 6dfdd6a + c26e555 commit 75864bc

File tree

5 files changed

+402
-128
lines changed

5 files changed

+402
-128
lines changed

Cargo.lock

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ hide-proto-docs = []
6565
metrics = []
6666
default = ["hide-proto-docs"]
6767

68-
# [patch.crates-io]
69-
# iroh = { git = "https://github.com/n0-computer/iroh.git", branch = "ramfox/ticket-error" }
70-
# iroh-base = { git = "https://github.com/n0-computer/iroh.git", branch = "ramfox/ticket-error" }
71-
# irpc = { git = "https://github.com/n0-computer/irpc.git", branch = "iroh-quinn-latest" }
72-
# irpc-derive = { git = "https://github.com/n0-computer/irpc.git", branch = "iroh-quinn-latest" }
68+
[patch.crates-io]
69+
iroh = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }
70+
iroh-base = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }
71+
irpc = { git = "https://github.com/n0-computer/irpc.git", branch = "main" }
72+
irpc-derive = { git = "https://github.com/n0-computer/irpc.git", branch = "main" }

deny.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@ hash = 3171872035
4141
path = "LICENSE"
4242

4343
[sources]
44-
allow-git = []
44+
allow-git = [
45+
"https://github.com/n0-computer/irpc.git",
46+
"https://github.com/n0-computer/iroh.git",
47+
]

src/store/fs/bao_file.rs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use crate::{
3434
fs::{meta::raw_outboard_size, TaskContext},
3535
util::{
3636
read_checksummed_and_truncate, write_checksummed, FixedSize, MemOrFile,
37-
PartialMemStorage, SizeInfo, SparseMemFile, DD,
37+
PartialMemStorage, DD,
3838
},
3939
Hash, IROH_BLOCK_SIZE,
4040
},
@@ -531,21 +531,11 @@ impl BaoFileHandle {
531531
if Arc::strong_count(&self.0) > 1 {
532532
return false;
533533
}
534-
// there is the possibility that somebody else will increase the strong count
535-
// here. there is nothing we can do about it, but they won't be able to
536-
// access the internals of the handle because we have the lock.
537-
//
538-
// We poison the storage. A poisoned storage is considered dead and will
539-
// have to be recreated, but only *after* we are done with persisting
540-
// the bitfield.
541534
let BaoFileStorage::Partial(fs) = guard.take() else {
542535
return false;
543536
};
544537
let options = &self.options;
545538
let path = options.path.bitfield_path(&self.hash);
546-
if fs.bitfield.size == 8000000 {
547-
println!("PERSISTING THE TEST CASE FILE to {}", path.display());
548-
}
549539
trace!(
550540
"writing bitfield for hash {} to {}",
551541
self.hash,
@@ -768,7 +758,7 @@ impl BaoFileHandle {
768758
}
769759

770760
impl PartialMemStorage {
771-
/// Persist the batch to disk, creating a FileBatch.
761+
/// Persist the batch to disk.
772762
fn persist(self, ctx: &TaskContext, hash: &Hash) -> io::Result<PartialFileStorage> {
773763
let options = &ctx.options.path;
774764
ctx.protect.protect(
@@ -796,12 +786,6 @@ impl PartialMemStorage {
796786
bitfield: self.bitfield,
797787
})
798788
}
799-
800-
/// Get the parts data, outboard and sizes
801-
#[allow(dead_code)]
802-
pub fn into_parts(self) -> (SparseMemFile, SparseMemFile, SizeInfo) {
803-
(self.data, self.outboard, self.size)
804-
}
805789
}
806790

807791
pub struct BaoFileStorageSubscriber {

0 commit comments

Comments
 (0)