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

CreateShardGroup was not idempotent at the meta store level #6257

Merged
merged 1 commit into from
Apr 7, 2016

Conversation

corylanou
Copy link
Contributor

  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated

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.

@corylanou
Copy link
Contributor Author

Fixes: #6238, #6058

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

Choose a reason for hiding this comment

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

typo in comment

@dgnorton
Copy link
Contributor

dgnorton commented Apr 7, 2016

One minor typo and agree with @e-dard's comment but otherwise LGTM.

defer c.mu.RUnlock()
d := c.cacheData.Clone()
return *d
}
Copy link
Contributor

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().

https://golang.org/doc/effective_go.html#Getters

Copy link
Contributor Author

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 :-)

@e-dard
Copy link
Contributor

e-dard commented Apr 7, 2016

LGTM

@@ -52,6 +52,7 @@ This release removes all of the old clustering code. It operates as a standalone
- [#6178](https:/influxdata/influxdb/issues/6178): Ensure SHARD DURATION is checked when recreating a retention policy
- [#6223](https:/influxdata/influxdb/issues/6223): Failure to start/run on Windows. Thanks @mvadu
- [#6237](https:/influxdata/influxdb/issues/6237): Enable continuous integration testing on Windows platform via AppVeyor. Thanks @mvadu
- [#6257](https:/influxdata/influxdb/issues/6257): CreateShardGroup was incrementing meta data index even when it was idempotent.
Copy link
Contributor

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.

@benbjohnson
Copy link
Contributor

Minor nits, otherwise lgtm

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.

6 participants