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

Add index tracking to metastore. #1672

Merged
merged 1 commit into from
Feb 21, 2015
Merged

Add index tracking to metastore. #1672

merged 1 commit into from
Feb 21, 2015

Conversation

benbjohnson
Copy link
Contributor

Overview

This pull request adds tracking of the index to the metastore so that data nodes will ignore replayed indexes when they are restarted. This does not include index persistence for the shards.

Changes

  • metastore.mustUpdate() takes an index parameter which will automatically set the index on the metastore.
  • Metastore index is read into Server.index on startup and when the metastore is copied.
  • Removed locks from individual apply functions and moved them to the Server.processor(). This removes double locking we were doing before.
  • I moved the applyWriteSeries() to be processed separately from the other commands so we don't server lock around every series write.
  • Added test case to ensure we don't crash on log replay. There's not really any way to inspect the skipped log entries.

Caveats

This does not include persistence of shard indices although that's less of an issue since shard writes are currently idempotent. We'll need to add that in a separate PR.

This commit adds tracking of the index to the metastore so that data
nodes will ignore replayed indexes when they are restarted. This
does not include index persistence for the shards.
@otoolep
Copy link
Contributor

otoolep commented Feb 21, 2015

Nice. Assuming the server index read from the Metatstore is hen used in the right way, ship it.

benbjohnson added a commit that referenced this pull request Feb 21, 2015
@benbjohnson benbjohnson merged commit 4e5b6e9 into master Feb 21, 2015
@benbjohnson benbjohnson deleted the data-node-recovery branch February 21, 2015 22:34
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