-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Simplify the Translog constructor by always expecting an existing translog #28676
Merged
Conversation
This file contains 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
dnhatn
approved these changes
Feb 14, 2018
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.
LGTM.
- match: { indices.test.primaries.translog.operations: 1 } | ||
- gt: { indices.test.primaries.translog.uncommitted_size_in_bytes: $empty_size } | ||
# we can't check this yet as creation size will contain two empty translog generations. A single | ||
# non empty generation with one op may be smaller or larger than that. |
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.
nit: indentation
s1monw
approved these changes
Feb 14, 2018
bleskes
added a commit
that referenced
this pull request
Feb 15, 2018
…nslog (#28676) Currently the Translog constructor is capable both of opening an existing translog and creating a new one (deleting existing files). This PR separates these two into separate code paths. The constructors opens files and a dedicated static methods creates an empty translog.
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Feb 15, 2018
* master: Add a note to the docs that _cat api `help` option cannot be used if an optional url param is used (elastic#28686) Lift error finding utility to exceptions helpers Change "tweet" type to "_doc" (elastic#28690) [Docs] Add missing word in nested.asciidoc (elastic#28507) Simplify the Translog constructor by always expecting an existing translog (elastic#28676) Upgrade t-digest to 3.2 (elastic#28295) (elastic#28305) Add comment explaining lazy declared versions
dnhatn
added a commit
that referenced
this pull request
Mar 17, 2018
A new engine now can have more than one empty translog since #28676. This cause #testShouldPeriodicallyFlush failed because in the test we asssume an engine should have one empty translog. This commit takes into account the extra translog size of a new engine.
dnhatn
added a commit
that referenced
this pull request
Mar 17, 2018
A new engine now can have more than one empty translog since #28676. This cause #testShouldPeriodicallyFlush failed because in the test we asssume an engine should have one empty translog. This commit takes into account the extra translog size of a new engine.
dnhatn
added a commit
that referenced
this pull request
Mar 31, 2018
If a primary executing the only indexing request is on a 6.2 node, the translog uncommitted size will equal to the translog creation size because there is no overhead (eg. multiple empty translog generations) on the old node. Moreover, since other primaries on current nodes did not receive writes, the flush request is no-op on these shards, translog uncommitted size does not change. In this case, the total translog uncommitted size on all primaries equal to the translog creation size. This commit loosens the assertion from less-than to less-than-or-equal to cover this case. Relates #28676
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Distributed Indexing/Engine
Anything around managing Lucene and the Translog in an open shard.
>non-issue
v6.3.0
v7.0.0-beta1
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.
Currently the Translog constructor is capable both of opening an existing translog and creating a new one (deleting existing files). This PR separates these two into separate code paths. The constructors opens files and a dedicated static methods creates an empty translog.
This PR is part of a bigger refactoring in #28245 , so please ignore any ugliness in the Engine code.