Skip to content

Conversation

@jasontedor
Copy link
Member

Today when starting a new engine, we read the global checkpoint from the
translog only if we are opening an existing translog. This commit
clarifies this situation by distinguishing the three cases of engine
creation in the constructor leading to clearer code.

Relates #21254

Today when starting a new engine, we read the global checkpoint from the
translog only if we are opening an existing translog. This commit
clarifies this situation by distinguishing the three cases of engine
creation in the constructor leading to clearer code.
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. Thanks @jasontedor

seqNoStats.getMaxSeqNo(),
seqNoStats.getLocalCheckpoint(),
seqNoStats.getGlobalCheckpoint());
logger.trace(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: seqNoStats has a toString - just use it and be safe?

Copy link
Member Author

Choose a reason for hiding this comment

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

I pushed 7a48c39.

logger.trace("created new InternalEngine");
}

private static SequenceNumbersService sequenceNumberService(
Copy link
Contributor

Choose a reason for hiding this comment

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

this is what you get from the crazy syntax 👅

@jasontedor
Copy link
Member Author

retest this please

In the constructor for the internal engine, we log a trace statement
showing the recovered max sequence number, local checkpoint, and global
checkpoint. This commit simplifies this logging statement to just use
the fact that SeqNoStats implements toString.
@jasontedor jasontedor merged commit b0e8696 into elastic:master Dec 2, 2016
@jasontedor
Copy link
Member Author

Thanks @bleskes.

@jasontedor jasontedor deleted the global-checkpoint-recovery-clarification branch December 2, 2016 20:00
@clintongormley clintongormley added :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. :Engine and removed :Engine :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. labels Feb 13, 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. >enhancement v6.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants