-
Type: Bug
-
Status: Resolved
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: 10.10
-
Fix Version/s: 10.10-HF69, 2023.0, 2021.30
-
Component/s: Events / Works, Key/Value Store
-
Release Notes Summary:Race condition is avoided when reading Work state from KV store.
-
Tags:
-
Backlog priority:900
-
Team:PLATFORM
-
Sprint:nxplatform #69, nxplatform #76
-
Story Points:3
What is happening here is a race condition.
The Work is appended to the stream at t0.
Its state is then put in the KV store at t1.
The consumer read the record from Kafka and request the KV store for its state between t0 and t1 resulting in an unknown state which mean Work canceled explaining the following WARN:
WARN [WorkComputation] work has been canceled, saving and returning
The state of the work should be persisted in the KV Store before the Work record is sent downstream.
To avoid this we could retry to get the state from the KV store after a short delay.
This fix was already committed to LTS 2021 in ticket NXP-28728. Requesting a backport to 10.10