samza
samza copied to clipboard
Wait for pending commits to finish during shutdown.
Issue: BlobStoreStateBackendIntegrationTest.testStopAndRestart fails occassionally if SamzaContainer shuts down before pending commits for its tasks are complete. Note: This issue does not affect correctness of commits, but does affect test reliability.
Fix: 1) Wait for pending commits to complete before shutting the container down. 2) Shut down commitThreadPool after the pending commits are complete (otherwise queued tasks requried to complete commits will be cancelled and commits will be unsuccessful).
Test: BlobStoreStateBackendIntegrationTest.testStopAndRestart passes in a loop.