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

feat: publish instanceID during peer comms #1420

Merged
merged 3 commits into from
Nov 12, 2024
Merged

Conversation

kentquirk
Copy link
Contributor

Which problem is this PR solving?

This is an alternative implementation of #1417, with 2 key differences:

  • Added a new generic type, MapWithTTL to store the ID and address and used it instead of SetWithTTL. It's about 15% slower than SetWithTTL for equivalent operations, but it solves the problem we have here.
  • I constrained the unique ID to 8 characters, hashed from a UUID.
  • I also cleaned up an unneeded typename in main.go that my editor was complaining about.

Closes #1417.

Copy link
Contributor

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

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

Looks good, just one suggestion to make the hash seed a little clearer.

cmd/refinery/main.go Show resolved Hide resolved
@MikeGoldsmith MikeGoldsmith merged commit 53f9dca into main Nov 12, 2024
5 checks passed
@MikeGoldsmith MikeGoldsmith deleted the kent.instance-id branch November 12, 2024 16:51
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.

2 participants