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

Pre-create shard groups #1897

Merged
merged 7 commits into from
Mar 10, 2015
Merged

Pre-create shard groups #1897

merged 7 commits into from
Mar 10, 2015

Conversation

corylanou
Copy link
Contributor

  1. Pre create shard groups

  2. Calculate and save the ShardGroupDuration for Retention Policies. This should never change even if they alter a retention policy in the future

Fixes #1873
Fixes #1783

1) Pre create shard groups

2) Calculate and save the ShardGroupDuration for Retention Policies. This should never change even if they alter a retention policy in the future
@corylanou corylanou self-assigned this Mar 9, 2015
RetentionAutoCreate bool `toml:"retention-auto-create"`
RetentionCheckEnabled bool `toml:"retention-check-enabled"`
RetentionCheckPeriod Duration `toml:"retention-check-period"`
ShardGroupPreCreateCheckPeriod Duration `toml:"shard-group-pre-create-check-period"`
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a pretty awkwardly-named config variable. :-) How about something as simple as retention-create-period?

Copy link
Contributor

Choose a reason for hiding this comment

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

"Shard groups" is an implementation detail, one of the reasons I don't like seeing it in the key names.

@otoolep
Copy link
Contributor

otoolep commented Mar 10, 2015

"pre-create" is not the clearest term. How about "rolling create"? I think this might better get across that it starts with some existing shard groups, and then continue to "roll" them into the future.

}

// ShardGroupPreCreate ensures that future shard groups and shards are created and ready for writing
// is removed from the server.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment seems to have trailing text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Line 364 or 365? I can't seem to find it. Also /\s\+$ in Vim on that file shows nothing...

@pauldix
Copy link
Member

pauldix commented Mar 10, 2015

Agree that you don't need a different message type from creating a shard group vs. precreating. Either way the result is the same, you're creating a shard group for a given block of time.

@pauldix
Copy link
Member

pauldix commented Mar 10, 2015

LGTM, 🚢

corylanou added a commit that referenced this pull request Mar 10, 2015
@corylanou corylanou merged commit 436d20f into master Mar 10, 2015
@corylanou corylanou deleted the proactively-create-shard-groups branch March 10, 2015 02:03
@otoolep
Copy link
Contributor

otoolep commented Mar 10, 2015

Nice. No more PreCreate messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants