psalagnac commented on code in PR #3702:
URL: https://github.com/apache/solr/pull/3702#discussion_r2390515570


##########
solr/core/src/java/org/apache/solr/cloud/Overseer.java:
##########
@@ -268,50 +253,50 @@ public void run() {
                   new ZkStateWriter(reader, stats, 
minStateByteLenForCompression, compressor);
               refreshClusterState = false;
 
-              // if there were any errors while processing
-              // the state queue, items would have been left in the
-              // work queue so let's process those first
-              byte[] data = fallbackQueue.peek();
+              // if there were any errors while processing the queue, items 
would have been left in
+              // the queue with a fallback size greater than 0, so let's 
process those first
+              byte[] data = stateUpdateQueue.peek();
               while (fallbackQueueSize > 0 && data != null) {

Review Comment:
   This is not dead code in case of error (as stated in the comment).
   If we fail to flush updates into Zookeeper, tasks remain in the in-memory 
queue and we will try to re-process them before fetching more from the 
distributed ZK queue.
   
   See test `OverseerTest.testExceptionWhenFlushClusterState` that reproduces 
this scenario.



-- 
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]

Reply via email to