Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

tolerates Consul providing duplicate keys #97

Merged
merged 1 commit into from
Jan 31, 2016

Conversation

jhovell
Copy link

@jhovell jhovell commented Jan 31, 2016

@rickfast here you go

reference:

#96

rickfast added a commit that referenced this pull request Jan 31, 2016
tolerates Consul providing duplicate keys
@rickfast rickfast merged commit 7d7fdf4 into rickfast:master Jan 31, 2016
@gjesse
Copy link
Contributor

gjesse commented Jan 31, 2016

Is there a more specific service key we should be using? does this method mean that some entities that should be included in the map aren't? Like maybe the key should be a combo of host/port/protocol instead of host/port - i don't like that this is just throwing away potential duplicates.

@jhovell
Copy link
Author

jhovell commented Feb 1, 2016

@gjesse you're definitely right. I think in the case of services some unique hash of the tags should be included as well. I don't know Consul well enough to say for sure & guessing the fix might be more involved, as I didn't look at all the places where this immutable map key is used. For key/value store, I think this would never happen, it's just good defensive coding.

this is at least an improvement, now we throw away 'duplicate' services instead of crashing ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants