-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Introduce Lucene-based metadata persistence #48733
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
Merged
DaveCTurner
merged 42 commits into
elastic:reduce-metadata-writes-master
from
DaveCTurner:2019-10-31-lucene-persisted-state
Nov 13, 2019
Merged
Changes from 38 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
17ec60e
Introduce Lucene-based metadata persistence
DaveCTurner 669d3b2
Revert whitespace
DaveCTurner 9ac94cb
Use IOUtils.close
DaveCTurner 7d65358
Support persistent storage in coordinator tests as long as there is n…
DaveCTurner dea94dd
Proper awaits fixes
DaveCTurner b431a1d
Fix up GatewayIndexStateIT
DaveCTurner 6526b82
Precommit
DaveCTurner ce19ee0
Merge branch 'reduce-metadata-writes-master' into 2019-10-31-lucene-p…
DaveCTurner 79fc46b
Merge branch 'master' into 2019-10-31-lucene-persisted-state
DaveCTurner 85a7424
Require freshest state to have the freshest current term
DaveCTurner 2a736d5
Merge branch 'master' into 2019-10-31-lucene-persisted-state
DaveCTurner 39b0358
Fix up test for previous commit
DaveCTurner fa22424
Check that updating the state also works
DaveCTurner fc80816
Use stored fields instead of docvalues
DaveCTurner 9fbf557
SerialMergeScheduler
DaveCTurner aa02a22
No query cache
DaveCTurner 3d34c6d
Reduce scope
DaveCTurner 1027c8c
Fix doc ID handling
DaveCTurner 8767e91
Add comment about SimpleFSDirectory
DaveCTurner 02761e6
Start with an empty index
DaveCTurner 2bf23b6
Write each doc to all indices at once
DaveCTurner 49bf7b4
Merge branch 'master' into 2019-10-31-lucene-persisted-state
DaveCTurner bb562f8
1MB buffer (and comments)
DaveCTurner bc2545c
FSDirectory.open instead of SimpleFSDirectory
DaveCTurner 983825d
Use BigArrays etc to avoid excessive allocation/copying
DaveCTurner e2cd38d
Keep releasable bytes alive after closing the XContentBuilder
DaveCTurner 263f0bd
Allow for sliced BytesRefs
DaveCTurner 7afabca
Detect bad closing behaviour using MockBigArrays
DaveCTurner 79e36ed
Unused GatewayPersistedState
DaveCTurner 0639b33
IOUtils.close not null check
DaveCTurner 7c1831d
MetaDataIndexWriter
DaveCTurner 4aa99f9
Use proper settings not just their names
DaveCTurner 314cadb
Capitalize D in MetaData in identifiers
DaveCTurner 455fd10
Comment
DaveCTurner 3c5d079
Add test showing behaviour across multiple indices
DaveCTurner 492b3a7
No need for a versioned folder (yet?)
DaveCTurner d2e4b70
Record paths in ISE messages
DaveCTurner 773b9f1
Reject duplicate/missing bits even if assertions disabled
DaveCTurner 3578297
Right size for hashmap
DaveCTurner e6e4d32
Use SimpleFSDirectory again
DaveCTurner 7fa29f9
Use updateDocument instead of delete/add
DaveCTurner 21e154f
super
DaveCTurner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we need a separate metadata folder? Given that we're not addressing BWC in this PR, should we use the current
_state
folder to keep things as close as possible to what we have today? Should thismetadata
folder become a subfolder of_state
at some point? Should it replace the full content of the state folder (i.e. incl. node id?)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.
I don't really see much difference either way, but I personally prefer the conceptual separation here. On dedicated master nodes we could indeed drop the node metadata file in due course. We avoid sharing a single folder between a Lucene index and some MetaDataStateFormat-based files in other places but we could break that pattern here if needed. I think repurposing will be a little simpler with separate folders, if only because there's no need to implement a new delete operation on
MetaDataStateFormat
when you can just wipe out the whole directory.