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

[Transform] Odd logging of version conflict on stop in rare cases #52035

Closed
hendrikmuhs opened this issue Feb 7, 2020 · 1 comment · Fixed by #62086
Closed

[Transform] Odd logging of version conflict on stop in rare cases #52035

hendrikmuhs opened this issue Feb 7, 2020 · 1 comment · Fixed by #62086
Labels
:ml/Transform Transform

Comments

@hendrikmuhs
Copy link

hendrikmuhs commented Feb 7, 2020

Followup from: #51629

We use optimistic concurrency control and keep the seq_nr/primary term in an atomic variable, still, when stopping a transform while at the same time it auto-stops, it is possible that 2 save state calls run at the same time from different threads. This is usually only the case if transforms is automated, e.g. this was found via CI.

The issue is benign, no information gets lost. Still it produces these warnings in the log, which is a bad user experience:

01:44:49 »  Caused by: org.elasticsearch.index.engine.VersionConflictEngineException: [data_frame_transform_state_and_stats-simple-local-remote-transform]: version conflict, document already exists (current version [1])
01:44:49 »  	at org.elasticsearch.index.engine.InternalEngine.planIndexingAsPrimary(InternalEngine.java:1062) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
01:44:49 »  	at org.elasticsearch.index.engine.InternalEngine.indexingStrategyForOperation(InternalEngine.java:1021) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
01:44:49 »  	at org.elasticsearch.index.engine.InternalEngine.index(InternalEngine.java:910) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
01:44:49 »  	at org.elasticsearch.index.shard.IndexShard.index(IndexShard.java:813) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
01:44:49 »  	at org.elasticsearch.index.shard.IndexShard.applyIndexOperation(IndexShard.java:785) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
01:44:49 »  	at org.elasticsearch.index.shard.IndexShard.applyIndexOperationOnPrimary(IndexShard.java:742) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
01:44:49 »  	at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:254) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
01:44:49 »  	at org.elasticsearch.action.bulk.TransportShardBulkAction$2.doRun(TransportShardBulkAction.java:157) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
01:44:49 »  	... 148 more
01:44:49 » WARN ][o.e.p.AllocatedPersistentTask] [mixed-cluster-0] attempt to complete task [data_frame/transforms[c]] with id [simple-local-remote-transform] in the [COMPLETED] state
@hendrikmuhs hendrikmuhs added the :ml/Transform Transform label Feb 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml/Transform)

hendrikmuhs pushed a commit that referenced this issue Sep 28, 2020
refactor how state is persisted, call doSaveState only from the indexer thread, except there is none.

fixes #60781
fixes #52931
fixes #51629
fixes #52035
hendrikmuhs pushed a commit that referenced this issue Sep 28, 2020
refactor how state is persisted, call doSaveState only from the indexer thread, except there is none.

fixes #60781
fixes #52931
fixes #51629
fixes #52035
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml/Transform Transform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants