[
https://issues.apache.org/jira/browse/FLINK-6467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002329#comment-16002329
]
Xiaogang Shi commented on FLINK-6467:
-------------------------------------
[[email protected]] Thanks for pointing out this problem. It's true that
{{newSstFiles}} will be accessed by both the cancel thread and the
materialization thread. But the materialization thread must be stopped (due to
the closing of the input stream/output stream and the interruption) when
{{releaseResources}} is executed in the cancel thread. So synchronization is
not added here. What do you think?
> Potential lack of synchronization w.r.t. newSstFiles in
> RocksDBKeyedStateBackend#releaseResources()
> ---------------------------------------------------------------------------------------------------
>
> Key: FLINK-6467
> URL: https://issues.apache.org/jira/browse/FLINK-6467
> Project: Flink
> Issue Type: Bug
> Components: State Backends, Checkpointing
> Reporter: Ted Yu
> Priority: Minor
>
> {code}
> if (canceled) {
> List<StateObject> statesToDiscard = new ArrayList<>();
> statesToDiscard.add(metaStateHandle);
> statesToDiscard.addAll(miscFiles.values());
> statesToDiscard.addAll(newSstFiles.values());
> {code}
> It seems access to newSstFiles should be protected by
> stateBackend.asyncSnapshotLock
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)