-
Notifications
You must be signed in to change notification settings - Fork 453
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
Improve M3DB session performance part 2: Dont clone IDs if they are IsNoFinalize() #986
Conversation
src/dbnode/client/session.go
Outdated
@@ -1185,7 +1185,7 @@ func (s *session) fetchTaggedAttemptWithRLock( | |||
) (*fetchState, error) { | |||
// NB(prateek): we have to clone the namespace, as we cannot guarantee the lifecycle | |||
// of the hostQueues responding is less than the lifecycle of the current method. | |||
nsClone := s.pools.id.Clone(ns) | |||
nsClone := s.maybeClone(ns) |
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.
lets skip the fetch path for now. the impact isn't going to be nearly as pronounced and i don't want to land it without a lot more testing.
@@ -966,8 +966,8 @@ func (s *session) writeAttemptWithRLock( | |||
// use in the various queues. Tracking per writeAttempt isn't sufficient as | |||
// we may enqueue multiple writeStates concurrently depending on retries | |||
// and consistency level checks. | |||
nsID := s.pools.id.Clone(namespace) | |||
tsID := s.pools.id.Clone(id) | |||
nsID := s.cloneFinalizable(namespace) |
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.
nit: also add a test cases to ensure we're doing the right thing. https://github.com/m3db/m3/blob/master/src/x/test/util.go#L30 won't be for naught
Codecov Report
@@ Coverage Diff @@
## master #986 +/- ##
==========================================
+ Coverage 75.53% 77.85% +2.31%
==========================================
Files 406 411 +5
Lines 34290 34473 +183
==========================================
+ Hits 25902 26840 +938
+ Misses 6492 5772 -720
+ Partials 1896 1861 -35
Continue to review full report at Codecov.
|
4d2fb01
to
b5d3e6f
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.
LGTM
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.
need to fix all the broken tests
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.
LGTM assuming build is green
No description provided.