cadonna commented on code in PR #17116:
URL: https://github.com/apache/kafka/pull/17116#discussion_r1756867091
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StateManagerUtil.java:
##########
@@ -93,21 +93,24 @@ static void registerStateStores(final Logger log,
}
final TaskId id = stateMgr.taskId();
- if (!stateDirectory.lock(id)) {
+ if (!stateDirectory.canTryLock(id, System.currentTimeMillis())) {
+ log.trace("Task {} is still not allowed to retry acquiring the
state directory lock", id);
Review Comment:
@aliehsaeedii @lucasbru I do not understand this branch.
If the task is not allowed to lock the state directory, the register method
will just return as if the state directory were locked. That means, the task
thinks it is initialized and the task is added to the state updater without the
lock on the state directory. Since the task thinks it successfully registered
the state store, it will never try to register the state store and acquire the
lock on the state directory again. Thus, the task will be an illegal state.
--
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]