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

Move series metadata to raft #689

Merged
merged 1 commit into from Jul 10, 2014

Conversation

jvshahid
Copy link
Contributor

No description provided.

@@ -329,6 +333,15 @@ func (self *ClusterConfiguration) DropDatabase(name string) error {
defer self.usersLock.Unlock()

delete(self.dbUsers, name)

fields := self.MetaStore.GetFieldsForDatabase(name)
self.MetaStore.DropDatabase(name)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there's a potential of a race condition here. We should combine these two functions into one DropAndGet() so we make sure that the fields don't change between the two calls. Same for DropSeries() on line 1056

Fixes #414. All series metadata, that is which series exist, what columns they have, and what the ids of those columns has been moved into Raft.

This means that list series queries are now very fast since they operate on an in memory data structure. It also means that writes no longer have to do gets agains the storage engine to resolve what a column's id is.

Fixes #358. List series now returns as a single series with a `name` column.

This fix has the potential to slow things down in scenarios that people suddenly write many thousands of new series in less than a second. That's because the definition of new series now needs to go through the raft leader and get consensus. I think it's unlikely that it'll be a problem, but we'll need to do extensive testing.

Finally, there is the issue that the Raft snapshots can potentially become big. We should do testing with setups that have millions of series to ensure that performance and startup time remain good.
jvshahid added a commit that referenced this pull request Jul 10, 2014
@jvshahid jvshahid merged commit 0a4f714 into master Jul 10, 2014
@jvshahid jvshahid deleted the fix-414-NEW-move-series-metadata-to-raft branch July 10, 2014 22:20
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.

None yet

2 participants