f2prateek opened a new pull request, #3607:
URL: https://github.com/apache/celeborn/pull/3607

   ### What changes were proposed in this pull request?
   Call saveCommittedFileInfosExecutor.shutdown() before awaitTermination() in 
saveAllCommittedFileInfosToDB() so the executor shuts down correctly during 
worker shutdown.
   
   ### Why are the changes needed?
   awaitTermination() only waits for the executor to finish after a shutdown 
has been requested; without shutdown(), the executor keeps running and can 
schedule more work.
   
   From [ExecutorService 
documentation](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html#awaitTermination-long-java.util.concurrent.TimeUnit-):
   
   > Blocks until all tasks have completed execution "after a shutdown 
request", ...
   
   ### Does this PR resolve a correctness bug?
   
   Possibly, as it could lead to race conditions writing to RocksDB during 
shutdown, which could cause data loss or correctness issues.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Should be exercised by  existing tests to ensure this doesn't introduce a 
regression.


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

Reply via email to