slukyano commented on issue #12639: URL: https://github.com/apache/ignite/issues/12639#issuecomment-3769004736
I'd say this is roughly the same as any other inter-process or inter-thread synchronization. If you have two workers (threads, processes, clients, etc.) that both read the same concurrency-enabled data structure, you must establish a happens-before relationship between the workers for worker2 to be guaranteed to see the write made by worker1. Take two Java threads `t1` and `t2` and a `volatile` field `f`. If `t1` writes to `f`, then sends "some" signal to `t2`, and `t2` reads `f`, `t2` is not guaranteed to see the write. For that to be guaranteed, the signal from `t1` to `t2` needs to create a happens-before relationship in terms of Java concurrency model. Similarly, with Ignite. When two clients access the same table and signal each other, the signal needs to create a happens-before relationship in Ignite's concurrency model. Ignite doesn't provide a straightforward API to implement this exact use case now. It could, and it isn't even hard, but right now the use case feels to me like it might have a better way to solve it. -- 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]
