New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch gossip #1143
Batch gossip #1143
Conversation
4abcbcc
to
f5204dd
Compare
@@ -144,7 +144,7 @@ CREATE INDEX IF NOT EXISTS DhtOp_validation_status_idx ON DhtOp ( validation_sta | |||
CREATE INDEX IF NOT EXISTS DhtOp_authored_timestamp_idx ON DhtOp ( authored_timestamp ); | |||
CREATE INDEX IF NOT EXISTS DhtOp_storage_center_loc_idx ON DhtOp ( storage_center_loc ); | |||
CREATE INDEX IF NOT EXISTS DhtOp_header_hash_idx ON DhtOp ( header_hash ); | |||
-- CREATE INDEX DhtOp_basis_hash_idx ON DhtOp ( basis_hash ); | |||
CREATE INDEX IF NOT EXISTS DhtOp_basis_hash_idx ON DhtOp ( basis_hash ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the magic index we needed? : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep 🚀
/// Is this the last chunk of ops to be sent in response | ||
/// to the bloom filter that we're responding to? | ||
finished.1: bool, | ||
/// Ops that are missing from a bloom that you have sent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these docs supposed to go above the ops.0
field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, it's more about explaining the finished MissingOpsStatus
crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/initiate.rs
Outdated
Show resolved
Hide resolved
crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/initiate.rs
Outdated
Show resolved
Hide resolved
crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/initiate.rs
Outdated
Show resolved
Hide resolved
/// [Default: 16] | ||
tx2_channel_count_per_connection: usize = 16, | ||
/// [Default: 2] | ||
tx2_channel_count_per_connection: usize = 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still working through this
.try_take_while(|_| { | ||
total_blooms += 1; | ||
futures::future::ready(Ok(total_blooms <= Self::UPPER_BLOOM_BOUND)) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that different than just this?
.try_take_while(|_| { | |
total_blooms += 1; | |
futures::future::ready(Ok(total_blooms <= Self::UPPER_BLOOM_BOUND)) | |
}) | |
.take(Self::UPPER_BLOOM_BOUND) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately there's no take
for a TryStream
crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/initiate.rs
Outdated
Show resolved
Hide resolved
)]), | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkpoint: this is as far as I got in one sitting
Co-authored-by: David Braden <neonphog@gmail.com> Co-authored-by: Michael Dougherty <michael.dougherty@holo.host>
|
||
let got_len = missing_ops.len(); | ||
|
||
// If there is less ops then missing hashes the call was batched. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because they are limited by the fetch ops call
crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/store.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Michael Dougherty <michael.dougherty@holo.host>
Summary
TODO: