Re: Rich Function Thread Safety

2020-10-29 Thread Igal Shilman
Hi Lian, Good to hear that you are learning about StateFun, and I'd be happy to answer any of your questions while doing so :-) Perhaps in the future it would be best if you start a new email thread, so that it would be easier to spot your question. The following is completely thread safe: final

Re: Rich Function Thread Safety

2020-10-25 Thread Lian Jiang
Hi, I am learning https://ci.apache.org/projects/flink/flink-statefun-docs-release-2.2/getting-started/java_walkthrough.html and wondering if the invoke function is thread safe for: final int seen = count.getOrDefault(0);count.set(seen + 1); >From >https://ci.apache.org/projects/flink/flink-sta

Re: Rich Function Thread Safety

2020-05-10 Thread Tzu-Li (Gordon) Tai
As others have mentioned already, it is true that method calls on operators (e.g. processing events and snapshotting state) will not concurrently happen. As for your findings in reading through the documentation, that might be a hint that we could add a bit more explanation mentioning this. Could

Re: Rich Function Thread Safety

2020-05-07 Thread tao xiao
As the java doc suggests it seems operator method and snapshot checkpoint are accessed by two different threads https://github.com/apache/flink/blob/release-1.10.0/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/SourceFunction.java#L39-L62 On Thu, May 7, 2020 at

Re: Rich Function Thread Safety

2020-05-06 Thread Joey Echeverria
I’ve seen a few mailing list posts (including this one) that say Flink guarantees there is no concurrent access to operator methods (e.g. flatMap, snapshotState, etc.) and thus synchronization isn’t needed when writing operators that support checkpointing. I was trying to find a place in the of

Re: Rich Function Thread Safety

2019-12-18 Thread Zhu Zhu
Hi Aaron, It is thread safe since the state snapshot happens in the same thread with the user function. Thanks, Zhu Zhu Aaron Langford 于2019年12月19日周四 上午11:25写道: > Hello Flink Community, > > I'm hoping to verify some understanding: > > If I have a function with managed state, I'm wondering if a