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

Improve M3DB session performance part 2: Dont clone IDs if they are IsNoFinalize() #986

Merged
merged 10 commits into from
Sep 30, 2018

Conversation

richardartoul
Copy link
Contributor

No description provided.

@@ -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)
Copy link
Collaborator

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)
Copy link
Collaborator

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
Copy link

codecov bot commented Sep 29, 2018

Codecov Report

Merging #986 into master will increase coverage by 2.31%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#dbnode 81.44% <66.66%> (+3.14%) ⬆️
#m3ninx 75.25% <ø> (ø) ⬆️
#query 64.24% <ø> (-0.12%) ⬇️
#x 84.72% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a5564d...e5977ae. Read the comment docs.

prateek
prateek previously approved these changes Sep 29, 2018
Copy link
Collaborator

@prateek prateek left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@prateek prateek left a 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

Copy link
Collaborator

@prateek prateek left a 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

@richardartoul richardartoul merged commit c94661f into master Sep 30, 2018
@prateek prateek deleted the ra/sess-perf-2 branch October 13, 2018 06:27
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