Skip to content
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

refactor(gossip): improved init flow #407

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

0xNineteen
Copy link
Contributor

@0xNineteen 0xNineteen commented Nov 26, 2024

  • Moved GossipService allocation to heap with new create() function
    • there were a random number of structs which were heap allocated, whereas others were not - this change puts everything on the stack, and uses the create method to make everything on the heap (which it should be due to the multi-threaded nature of gossip)
  • Removed thread pool dependency from GossipTable initialization (was dead code)
  • Removed unused echo server implementation (was dead code)
    • ticket to add it back with working server here
  • Added proper cleanup of muxes in GossipService deinit

Copy link
Contributor Author

0xNineteen commented Nov 26, 2024

Copy link
Contributor

@yewman yewman left a comment

Choose a reason for hiding this comment

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

Love these changes, just a couple of comments that I am interested to hear your view on

src/gossip/service.zig Show resolved Hide resolved
src/gossip/service.zig Show resolved Hide resolved
@0xNineteen 0xNineteen force-pushed the 11-26-refactor_gossip_improved_init_flow branch from 8aa6462 to e656c54 Compare November 27, 2024 19:25
@0xNineteen 0xNineteen force-pushed the 11-26-refactor_gossip_improved_init_flow branch from e656c54 to 8c93a71 Compare November 27, 2024 19:31
@yewman yewman self-requested a review November 27, 2024 20:33
Copy link
Contributor

@yewman yewman left a comment

Choose a reason for hiding this comment

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

lgtm

@0xNineteen 0xNineteen enabled auto-merge (squash) November 27, 2024 20:37
@0xNineteen 0xNineteen merged commit b6f95c3 into main Nov 27, 2024
7 checks passed
@0xNineteen 0xNineteen deleted the 11-26-refactor_gossip_improved_init_flow branch November 27, 2024 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants