Skip to content

flamenco, gossip: two-tiered value table #4800

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

Merged
merged 2 commits into from
May 2, 2025

Conversation

ravyu-jump
Copy link
Contributor

@ravyu-jump ravyu-jump commented Apr 16, 2025

We now have two data structures that manage our Gossip value table

  1. value_metas: holds the metadata (hash + wallclock) of a processed value. Used in dedup + bloom filter construction.

  2. values: vector that holds the encoded form of the processed value. Used in gossip push + pull resp loops. The loops are now linear scans.

A cleanup policy that exploits this tiered value table will allow us to maintain a much smaller values vector without affecting the metadata map, which will help where only data is needed (push + pullresp). Will come in a future PR.

@ravyu-jump ravyu-jump force-pushed the gossip-two-tiered-value-table branch 3 times, most recently from 8a3eff2 to aa09a24 Compare April 16, 2025 21:46
Copy link
Contributor

@cali-jumptrading cali-jumptrading left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not super familiar with the gossip implementation, so I did a quick pass. Looks great though!

@ravyu-jump ravyu-jump force-pushed the gossip-two-tiered-value-table branch from aa09a24 to 62e9553 Compare April 17, 2025 18:20
vector as a push queue.
See fd_gossip_cleanup_values for an example */
static ulong
fd_gossip_compact_values( fd_gossip_t * glob ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why preserve ordering in this algorithm? Unordered deletes have lower runtime complexity

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we technically don't need strict ordering, just need a way to make sure values that have been pushed and values that need to be pushed don't get mixed up. I can come up with something lower runtime complexity but that's probably better served in a separate PR

topointon-jump
topointon-jump previously approved these changes Apr 28, 2025
@ravyu-jump ravyu-jump added this pull request to the merge queue May 2, 2025
Merged via the queue into main with commit e0de87d May 2, 2025
9 checks passed
@ravyu-jump ravyu-jump deleted the gossip-two-tiered-value-table branch May 2, 2025 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants