-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
CreateShardGroup was not idempotent at the meta store level #6257
Conversation
28eb12a
to
cb3d693
Compare
@@ -770,17 +776,26 @@ func (c *Client) PrecreateShardGroups(from, to time.Time) error { | |||
|
|||
// Create successive shard group. | |||
nextShardGroupTime := g.EndTime.Add(1 * time.Nanosecond) | |||
if newGroup, err := createShardGroup(data, di.Name, rp.Name, nextShardGroupTime); err != nil { | |||
// if ti already exists, continue |
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.
typo in comment
One minor typo and agree with @e-dard's comment but otherwise LGTM. |
defer c.mu.RUnlock() | ||
d := c.cacheData.Clone() | ||
return *d | ||
} |
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.
This name should just be Data()
instead of GetData()
.
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.
fixed. My brain was stuck on that I had a SetData
method right above it :-)
LGTM |
@@ -52,6 +52,7 @@ This release removes all of the old clustering code. It operates as a standalone | |||
- [#6178](https://github.com/influxdata/influxdb/issues/6178): Ensure SHARD DURATION is checked when recreating a retention policy | |||
- [#6223](https://github.com/influxdata/influxdb/issues/6223): Failure to start/run on Windows. Thanks @mvadu | |||
- [#6237](https://github.com/influxdata/influxdb/issues/6237): Enable continuous integration testing on Windows platform via AppVeyor. Thanks @mvadu | |||
- [#6257](https://github.com/influxdata/influxdb/issues/6257): CreateShardGroup was incrementing meta data index even when it was idempotent. |
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.
0.12.0 has already been released. This should go into 0.13.0 and then be copied to 0.12.1 if it's going to be part of that release.
Minor nits, otherwise lgtm |
cb3d693
to
ba127a9
Compare
ba127a9
to
7eaf7f8
Compare
This bug was causing the index on the meta store to index for EVERY single write, and basically doubled the disk ops because of the fsync.