GitHub user shixiaogang opened a pull request:
FLINK-6504 FLINK-6467 [checkpoints] Add needed synchronization for RocksDBIncrementalSnapshotOperation
This pull request adds missing synchronization for the access to the following variables:
1. `materializedSstFiles` in `RocksDBKeyedStateBackend`: The variable may be accessed simultaneously by the processing thread (read) and the materialization threads (write). Now we use `asynchronousSnapshotLock` to prevent concurrent access.
2. `newSstFiles`, `oldSstFiles` and `metaStateHandle` in `RocksDBIncrementalSnapshotOperation`: These variables may be accessed by both the cancel thread and the materialization thread. Though the materialization thread are supposed to be stopped when `releaseResources()` is executed, we add synchronization here to prevent potential conflicts.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/shixiaogang/flink flink-6504
Alternatively you can review and apply these changes as the patch at:
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3859
Author: xiaogang.sxg <firstname.lastname@example.org>
Add needed synchronization for RocksDBIncrementalSnapshotOperation