When a retryable exception such as “Transaction too old” is thrown while calling .get()
on the Future returned by reading a single value using the Java bindings, the transaction does not retry. It looks like the issue is here, where the Java bindings only check one layer deep for the FDBException cause, but in this case the cause is nested 2 levels deep: https://github.com/apple/foundationdb/blob/c09a06fff8f35c45c180df85cd61ab40e70eb2d6/bindings/java/src/main/com/apple/foundationdb/FDBTransaction.java#L710-L717
If I catch all exceptions inside my transaction function and then re-throw the cause if it’s an FDBException, the issue is resolved - which seems to confirm my above suspicion