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

Introduce Local checkpoints #15390

Closed
wants to merge 9 commits into from

Conversation

bleskes
Copy link
Contributor

@bleskes bleskes commented Dec 11, 2015

This PR introduces the notion of a local checkpoint on the shard level. A local check point is defined as a the highest sequence number for which all previous operations (i.e. with a lower seq#) have been processed.

The current implementation is based on a fixed in memory bit array which is used in a round robin fashion. This introduces a limit to the spread between inflight indexing operation. We are still discussing options to work around this, but I think we should move forward toward a working system and optimize from there (and either remove this limitation or better understand it's implications).

relates to #10708

replaces #15111



/**
* an order list of bit arrays representing pending seq nos. The list is "anchored" in {@link #firstSeqNoInProcessSeqNo}
Copy link
Member

Choose a reason for hiding this comment

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

Typo: "an order list" -> "an ordered list"

*/
final LinkedList<FixedBitSet> processedSeqNo;
final int bitArraysSize;
long firstSeqNoInProcessSeqNo = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This name is a mouthful; can it just be firstSeqNoInProcess?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it's an annoying name. Tweaked.

@jasontedor
Copy link
Member

This is a much simpler implementation than the first. I've minor comments on LocalCheckpointService and the associated tests but otherwise LGTM.

@jasontedor jasontedor removed the review label Dec 14, 2015
@bleskes
Copy link
Contributor Author

bleskes commented Dec 15, 2015

Thanks @jasontedor . I pushed another commit, addressing all your feedback

"index.translog.interval",
"index.translog.sync_interval",
"index.shard.inactive_time",
LocalCheckpointService.SETTINGS_BIT_ARRAYS_SIZE,
Copy link
Member

Choose a reason for hiding this comment

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

Nit: The indentation is off on this line.

@jasontedor
Copy link
Member

I have one more small nit, but LGTM.

bleskes added a commit that referenced this pull request Dec 15, 2015
This PR introduces the notion of a local checkpoint on the shard level. A local check point is defined as a the highest sequence number for which all previous operations (i.e. with a lower seq#) have been processed.

relates to #10708

Closes #15390

formatting
@bleskes
Copy link
Contributor Author

bleskes commented Dec 15, 2015

pushed to feature/seq_no. Thanks @jasontedor

@bleskes bleskes closed this Dec 15, 2015
@bleskes bleskes deleted the local_checkpoint branch December 15, 2015 14:26
@clintongormley clintongormley added :Engine :Distributed/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/Engine Anything around managing Lucene and the Translog in an open shard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants