1996fanrui commented on code in PR #21547:
URL: https://github.com/apache/flink/pull/21547#discussion_r1070247686
##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/snapshot/RocksDBSnapshotStrategyBase.java:
##########
@@ -325,6 +329,7 @@ protected RocksDBSnapshotOperation(
this.checkpointStreamFactory = checkpointStreamFactory;
this.stateMetaInfoSnapshots = stateMetaInfoSnapshots;
this.localBackupDirectory = localBackupDirectory;
+ this.tmpResourcesRegistry = new CloseableRegistry();
Review Comment:
Thanks for your quick feedback!
> will “tmpResourcesRegistry.registerCloseable() throw IOException after
close()” cause the job to failover?
It doesn't cause job to failover directly, it just causes current checkpoint
fails.
We can see the code, `outputStream.closeAndGetHandle();` and
`tmpResourcesRegistry.registerCloseable()` are in the same method, they are
executed in uploader thread. So the `tmpResourcesRegistry.registerCloseable()`
throws exception is similar to `outputStream.closeAndGetHandle();`.
As we know, if the
[execution.checkpointing.tolerable-failed-checkpoints](https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/deployment/config/#execution-checkpointing-tolerable-failed-checkpoints)
> 0, the job will continue to run after writing checkpoint file fails. So
`tmpResourcesRegistry.registerCloseable()` works too.
<img width="998" alt="image"
src="https://user-images.githubusercontent.com/38427477/212467318-27036f4f-9001-4cfa-abdc-e741f27dd8a6.png">
--
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]