sarkaramrit1993 commented on PR #5359:
URL: https://github.com/apache/solr/pull/5359#issuecomment-6966052869

   Thanks @Neta-Rose for tracking this down and for the clear write-up. Locally 
the 5 new tests pass, the cancelled/promoted/max-retries ones fail with the fix 
reverted, and the recovery, tlog, PeerSync, split and MIGRATE suites are green.
   
   One gap: the `isInterrupted()` guard skips the drop on the main trigger. On 
leader election, `close()` calls `cancelPrepRecoveryCmd()` → 
`FutureTask.cancel(true)`. `sendPrepRecoveryCmd()` runs that task on the 
recovery thread itself, right after `bufferUpdates()`, so the recovery thread 
gets interrupted (`HttpJettySolrClient` keeps the flag). The loop exits via 
`isClosed()` and the ulog stays BUFFERING.
   
   The current cancel test calls `cancelRecovery()` from the replay hook, when 
no prep request is in flight, so it misses this. Pausing PREPRECOVERY with 
`TestInjection.prepRecoveryOpPauseForever = "true:100"` and cancelling from the 
test thread fails 5/5 on this PR and passes 5/5 without the `isInterrupted()` 
clause. Your 5 tests still pass without it, since `cc.isShutDown()` already 
covers shutdown.
   
   Suggestion: drop the `isInterrupted()` check and add that case as a test. 
Happy to share mine.
   


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