This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
forked from scylladb/gocql
-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
martin-sucha
force-pushed
the
ms/tokenawarebandit
branch
2 times, most recently
from
February 3, 2021 10:58
bfb483b
to
2b6f1eb
Compare
I've used RWLock while developing this, but tokenAwareHostPolicy uses lock-free reads of hosts/ring etc. It's possible we'll need to change this policy to do something similar for performance reasons (we'll see once we test it), but we probably can't avoid locking the individual hosts. |
matoous
suggested changes
Feb 3, 2021
matoous
reviewed
Feb 3, 2021
mrVanboy
suggested changes
Feb 3, 2021
And one last thing: could we plz organize types and their methods to be close or in a pattern:
|
Okay, regorganized the file a little bit. |
mrVanboy
reviewed
Feb 4, 2021
mrVanboy
reviewed
Feb 4, 2021
Looks almost perfect! We only need to squash commits and change the commit description to reflect the new naming :) Do we want to let it run e.g. on canary over the weekend? |
This policy should better handle network issues where latency of some subset of nodes is worse (e.g. when packets are dropped and the data needs to be retransmitted). Tracking latency allows us to detect this case and switch to different replicas instead. This commit introduces dependencies on github.com/klauspost/cpuid/v2 and golang.org/x/sys, so that we can use per-CPU data structures for recording latency. This is necessary to avoid lock contention as many queries need to write latency data to the same hosts. Co-authored-by: Matouš Dzivjak <matous.dzivjak@kiwi.com> Co-authored-by: Ivan Boyarkin <ivan.boyarkin@kiwi.com>
martin-sucha
force-pushed
the
ms/tokenawarebandit
branch
from
February 5, 2021 08:49
2c19389
to
aa0eb2b
Compare
Squashed and updated docs for |
mrVanboy
changed the title
Add TokenAwareBanditHostPolicy
Add TokenAwareLatencyHostPolicy
Feb 5, 2021
mrVanboy
approved these changes
Feb 5, 2021
matoous
approved these changes
Feb 5, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This policy should better handle network issues where latency of some
subset of nodes is worse (e.g. when packets are dropped and the data
needs to be retransmitted).