Skip to content

Conversation

@jasontedor
Copy link
Member

@jasontedor jasontedor commented May 7, 2017

Today when opening the engine we skip gaps in the history, advancing the local checkpoint until it is equal to the maximum sequence number contained in the commit. This allows history to advance, but it leaves gaps. A previous change filled these gaps when recovering from store, but since we were skipping the gaps while opening the engine, this change had no effect. This commit removes the gap skipping when opening the engine allowing the gap filling to do its job.

Relates #10708, relates #24238

Today when opening the engine we skip gaps in the history, advancing the
local checkpoint until it is equal to the maximum sequence number
contained in the commit. This allows history to advance, but it leaves
gaps. A previous change filled these gaps when recovering from store,
but since we were skipping the gaps while opening the engine, this
change had no effect. This commit removes the gap skipping when opening
the engine allowing the gap filling to do its job.
@jasontedor jasontedor force-pushed the engine-open-gap-skip branch from 88db3fe to 7602ad6 Compare May 7, 2017 03:55
Copy link
Contributor

@bleskes bleskes left a comment

Choose a reason for hiding this comment

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

LGTM

final long maxSeqNo = seqNoService().getMaxSeqNo();
int numNoOpsAdded = 0;
for (long seqNo = localCheckpoint + 1; seqNo <= maxSeqId;
// the local checkpoint might have been advanced so we are leap-frogging
Copy link
Contributor

Choose a reason for hiding this comment

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

why lose the comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

Back in 61a2093.

jasontedor added 2 commits May 8, 2017 06:35
* master:
  documentation of preserve existing settings
  remove duplicated import in AppendProcessor
@jasontedor jasontedor merged commit bbdaf11 into elastic:master May 8, 2017
@jasontedor
Copy link
Member Author

Thanks @bleskes.

@jasontedor jasontedor deleted the engine-open-gap-skip branch May 8, 2017 10:38
@clintongormley clintongormley added :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. and removed :Sequence IDs labels Feb 14, 2018
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.0.0-alpha2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants