git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ConcurrentModificationException while accessing managed keyed state


Hi,

I have a use case where I am keeping the keyed state in ProcessFunction. 

Key: Integer personId;
/**
 * The data type stored in the state
 */
public class PersonDetails {
    public long count;
    public long lastModified;
}

I have encountered a lot of ConcurrentModificationException. 

I thought Flink processes all the operators on a keyed stream in a single thread. It seems like operators being accessed through multiple threads.

If I get such exception then the data coming from Kafka would be consumed without making an update to the internal state. Making me lose the data.

Please help me in handling the case according to my use case.

Thanks,

--

Garvit Sharma
github.com/garvitlnmiit/

No Body is a Scholar by birth, its only hard work and strong determination that makes him master.


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-flink-users/msg09592.html on line 76
Call Stack
#TimeMemoryFunctionLocation
10.0033368696{main}( ).../msg09592.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-flink-users/msg09592.html on line 76
Call Stack
#TimeMemoryFunctionLocation
10.0033368696{main}( ).../msg09592.html:0