Skip to content

Conversation

@dnhatn
Copy link
Member

@dnhatn dnhatn commented Jul 1, 2019

With Lucene rollback (#33473), we should never have more than one primary term for each sequence number. Therefore we don't have to sort by the primary term when reading soft-deletes.

@dnhatn dnhatn added >enhancement :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. v8.0.0 v7.3.0 labels Jul 1, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@dnhatn
Copy link
Member Author

dnhatn commented Jul 1, 2019

@elasticmachine test this please

Copy link
Contributor

@s1monw s1monw left a comment

Choose a reason for hiding this comment

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

Makes sense to me

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM. I'm surprised this didn't have a test.

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

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

LGTM

@dnhatn
Copy link
Member Author

dnhatn commented Jul 2, 2019

I'm surprised this didn't have a test.

We tested this behavior here. Previously we generated different terms for the same sequence number but stopped doing that because an engine would reject it now.

@dnhatn
Copy link
Member Author

dnhatn commented Jul 2, 2019

Thanks everyone!

@dnhatn dnhatn merged commit 217b875 into elastic:master Jul 2, 2019
@dnhatn dnhatn deleted the remove_primary_term_sort branch July 2, 2019 14:53
@ywelsch
Copy link
Contributor

ywelsch commented Jul 2, 2019

We tested this behavior here. Previously we generated different terms for the same sequence number but stopped doing that because an engine would reject it now.

Thanks for looking into this.

dnhatn added a commit that referenced this pull request Jul 2, 2019
With Lucene rollback (#33473), we should never have more than one
primary term for each sequence number. Therefore we don't have to sort
by the primary term when reading soft-deletes.
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 v7.3.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants