vamossagar12 commented on PR #13801:
URL: https://github.com/apache/kafka/pull/13801#issuecomment-2047548232

   Chris, I started changing the tests in alignment with the comments (i.e 
using AtomicBoolean, AtomicReference and removing try-catch block). I noticed 
an interesting issue with 
`testFlushFailureWhenWritesToPrimaryStoreFailsAndSecondarySucceedsForTombstoneRecords`
 test. What's happening is that when we do a get on the future returned in this 
case, that doesn't throw an exception. I debugged it and I think the problem is 
because in this case, when the primary store fails, we set the callback to 
error correctly. However, because the secondary store write doesn't fail, when 
it's callback gets invoked from 
[here](https://github.com/apache/kafka/pull/13801/files#diff-0b612a24267f45b927d37b223af3034feebe4363b23b53f5751f1b29e54e2aa7R331),
 eventually the callback's onCompletion sets it to a non-error from 
[here](https://github.com/apache/kafka/blob/f895ab5145077c5efa10a4a898628d901b01e2c2/connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaOffsetBackingStore.java#L369-L372).
  The net effect is that the .get() call on the future doesn't return an error 
which isn't right. 


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to