-
Notifications
You must be signed in to change notification settings - Fork 452
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
READY: GigaChannel Community gossip caching #4648
Conversation
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.
Instead of relying on the randomness, the number of torrents that can be sent can be played with. For example, a test scenario could be.
- Say max_entries that can fit in a gossip is 4, renewal period is 3 and Node 0 has 3 (<max_entries) at time t, then
- At time t+1, Node 0 gossips random torrents (all 3 in this case) to Node1. Node 1 confirms receival of those 3 torrents.
- At time t+2, Node 0 adds more 3 more torrents, totalling 6. With this at least one more random torrent will be there for a new gossip. But since we are caching gossipping data, the next gossip would be a cached one and be equal to the first gossip. Assertion could be for the equality here.
- At time t+3, gossip_renewal_period has reached so the new gossip should be sent. In this case, at least one torrent should be different from the previous gossips which could be checked.
This should always pass. Just a thought.
Good point! This points me to another solution: just delete the old torrents on the sender and add new ones. |
49fbe43
to
5ade652
Compare
This makes GigaChannel Community cache the results of the SQL query that selects the channel contents to gossip around. The resulting blob is saved for reuse in the Community object. The blob will be sent to 30 peers, and then the new query will be performed. This significantly reduces the background DB activity.
5ade652
to
35bd4e0
Compare
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.
Much appreciated 👍
This makes GigaChannel Community cache the results of the SQL query that selects the channel contents to gossip around. The resulting blob is then saved for reuse in the Community object. The blob will be sent to 30 peers, and then the new query will be performed. This significantly reduces the background DB activity.
Fixes #4636