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

Revert translog changes introduced for CCR #31947

Merged
merged 1 commit into from
Jul 11, 2018

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Jul 11, 2018

We introduced these changes in #26708 because for CCR.
However, CCR now uses Lucene instead of translog.

This commit reverts these changes so that we can
minimize differences between the ccr and the master branch.

We introduced these changes in elastic#26708 because for CCR.
However, CCR now uses Lucene instead of translog.

This commit reverts these changes so that we can
minimize differences between the ccr and the master branch.
@dnhatn dnhatn added >feature :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features labels Jul 11, 2018
@dnhatn dnhatn requested a review from martijnvg July 11, 2018 01:50
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Thanks for removing this now redundant code. LGTM

@martijnvg
Copy link
Member

The PR CI failed because of:

java.lang.AssertionError: seqNo [419] was processed twice in generation [2], with different data. prvOp [Index{id='usxLh2QBIuRTcPeFc2TS', type='doc', seqNo=419, primaryTerm=2, version=1, versionType=EXTERNAL, autoGeneratedIdTimestamp=-1}], newOp [Index{id='usxLh2QBIuRTcPeFc2TS', type='doc', seqNo=419, primaryTerm=1, version=1, versionType=EXTERNAL, autoGeneratedIdTimestamp=-1}]
  2>    at __randomizedtesting.SeedInfo.seed([86E02CAB8502E91F]:0)
  2>    at org.elasticsearch.index.translog.TranslogWriter.assertNoSeqNumberConflict(TranslogWriter.java:227)
  2>    at org.elasticsearch.index.translog.TranslogWriter.add(TranslogWriter.java:193)
  2>    at org.elasticsearch.index.translog.Translog.add(Translog.java:497)
  2>    at org.elasticsearch.index.engine.InternalEngine.index(InternalEngine.java:859)
  2>    at org.elasticsearch.index.shard.IndexShard.index(IndexShard.java:709)
  2>    at org.elasticsearch.index.shard.IndexShard.applyIndexOperation(IndexShard.java:685)
  2>    at org.elasticsearch.index.shard.IndexShard.applyTranslogOperation(IndexShard.java:1215)
  2>    at org.elasticsearch.indices.recovery.RecoveryTarget.indexTranslogOperations(RecoveryTarget.java:397)
  2>    at org.elasticsearch.indices.recovery.PeerRecoveryTargetService$TranslogOperationsRequestHandler.messageReceived(PeerRecoveryTargetService.java:458)
  2>    at org.elasticsearch.indices.recovery.PeerRecoveryTargetService$TranslogOperationsRequestHandler.messageReceived(PeerRecoveryTargetService.java:448)
  2>    at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:63)
  2>    at org.elasticsearch.transport.TcpTransport$RequestHandler.doRun(TcpTransport.java:1679)

I don't think it is related to the changes in this PR, but I thought changes were made so that this assertion wouldn't trigger?

@dnhatn
Copy link
Member Author

dnhatn commented Jul 11, 2018

I've relaxed versionType and timestamp. This test failed because the primary terms were different.

prvOp [Index{id='usxLh2QBIuRTcPeFc2TS', type='doc', seqNo=419, primaryTerm=2, version=1, versionType=EXTERNAL, autoGeneratedIdTimestamp=-1}],

newOp [Index{id='usxLh2QBIuRTcPeFc2TS', type='doc', seqNo=419, primaryTerm=1, version=1, versionType=EXTERNAL, autoGeneratedIdTimestamp=-1}]

@dnhatn
Copy link
Member Author

dnhatn commented Jul 11, 2018

@elasticmachine test this please

@dnhatn
Copy link
Member Author

dnhatn commented Jul 11, 2018

Thanks @martijnvg for reviewing.

@dnhatn dnhatn merged commit 4d18017 into elastic:ccr Jul 11, 2018
@dnhatn dnhatn deleted the backout-translog-changes branch July 11, 2018 19:02
dnhatn added a commit that referenced this pull request Aug 2, 2018
We introduced these changes in #26708 because for CCR.
However, CCR now uses Lucene instead of translog.

This commit reverts these changes so that we can
minimize differences between the ccr and the master branch.

Relates ##26708
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants