Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.4.0
-
None
-
None
Description
The KvStateRegistry#registerKvState method is a bit weird. On each call, a new KvStateID is generated, and we then check whether a state for this ID was already registered. Realistically, this is never the case making the check unnecessary, and on the off-chance that it does happen the job will fail for no good reason.
KvStateID kvStateId = new KvStateID(); if (registeredKvStates.putIfAbsent(kvStateId, kvState) == null) { KvStateRegistryListener listener = this.listener.get(); if (listener != null) { listener.notifyKvStateRegistered( jobId, jobVertexId, keyGroupRange, registrationName, kvStateId); } return kvStateId; } else { throw new IllegalStateException(kvStateId + " is already registered."); }
Attachments
Issue Links
- links to