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

[dbnode] Fix bootstrapping data for an unowned shard with commit log #2052

Merged
merged 3 commits into from
Nov 27, 2019

Conversation

robskillington
Copy link
Collaborator

What this PR does / why we need it:

Fixes issue #2051 on master with the latest bootstrapping changes, the commit log bootstrapper was attempting to bootstrap data from shards it no longer owned.

Followup change with an integration test to catch this case will follow.

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:

NONE

Does this PR require updating code package or user-facing documentation?:

NONE

@@ -476,6 +478,13 @@ func (s *commitLogSource) Read(
datapointsSkippedNotBootstrappingNamespace++
continue
}
// If not bootstrapping shard for this series then also skip.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit for future work: maybe good to have a short explanation here describing how this state can occur

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good, will do.

fmt.Errorf("result missing for namespace: %v", nsID.String())

var result NamespaceResult
if err == nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit for future: this may read cleaner if you do the error logging seperately?

Copy link
Collaborator

@arnikola arnikola left a comment

Choose a reason for hiding this comment

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

approved with nits for future work

@codecov
Copy link

codecov bot commented Nov 27, 2019

Codecov Report

Merging #2052 into master will decrease coverage by 4.1%.
The diff coverage is 66.6%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2052      +/-   ##
==========================================
- Coverage    71.2%      67%    -4.2%     
==========================================
  Files        1011     1011              
  Lines       87030   110267   +23237     
==========================================
+ Hits        61980    73981   +12001     
- Misses      20867    31714   +10847     
- Partials     4183     4572     +389
Flag Coverage Δ
#aggregator 84.5% <ø> (+14.4%) ⬆️
#cluster 79.6% <ø> (+12.9%) ⬆️
#collector 63.7% <ø> (ø) ⬆️
#dbnode 76.7% <66.6%> (-2.9%) ⬇️
#m3em 13.7% <ø> (-52.3%) ⬇️
#m3ninx 67.9% <ø> (-1.8%) ⬇️
#m3nsch 55.4% <46.6%> (+12.2%) ⬆️
#metrics 46.2% <46.6%> (+28.5%) ⬆️
#msg 75.3% <ø> (+1%) ⬆️
#query 52.3% <46.6%> (+10.3%) ⬆️
#x 83.5% <ø> (+1.6%) ⬆️

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 de4bc64...440818b. Read the comment docs.

@robskillington robskillington merged commit 65b7f92 into master Nov 27, 2019
@robskillington robskillington deleted the r/fix-bootstrapping-data-for-unowned-shard branch November 27, 2019 16:28
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