stillalex commented on code in PR #1504:
URL: https://github.com/apache/solr/pull/1504#discussion_r1163180972
##########
solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java:
##########
@@ -331,7 +342,7 @@ protected boolean versionAdd(AddUpdateCommand cmd) throws
IOException {
boolean isReplayOrPeersync =
(cmd.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.PEER_SYNC)) !=
0;
- boolean leaderLogic = isLeader && !isReplayOrPeersync;
+ boolean leaderLogic =
leaderLogicWithVersionIntegrityCheck(isReplayOrPeersync, versionOnUpdate);
Review Comment:
I am not as confident about the above anymore looking at the error traces.
not sure how, but the test is using CloudSolrClient for some of the requests, I
am seeing the following in the logs
```
2> 11376 INFO (Thread-43) [] o.a.s.c.s.i.CloudSolrClient Request to
collection [collection1] failed due to (400)
org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException: Error
from server at http://127.0.0.1:59362/collection1: missing _version_ on update
from leader, retry=0 maxRetries=5 commError=false errorCode=400
```
I am considering changing the response code from BAD_REQUEST to
INVALID_STATE to allow for a retry (same as #1484). thanks for the hint
@dsmiley, it didn't click when you mentioned it earlier (what was missing was
the extra check).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]