You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes: #3338
* Fix ConcurrentContainer lifecycle issues
This commit would fix the following issues.
1) 'isChildRunning' API would return true only after all the containers are actually stopped.
2) ConcurrentContainer `start` would be permitted only after all the containers running status is false.
3) ConcurrentContainer `stop` would be permitted if the container is in running status or if previously `stop` API is not called.
4) Move the logic to verify whether to permit the `stop` call to KafkaMessageListenerContainer and ConcurrentMessageListenerContainer.
5) Add 'stopAbnormally' in a Lock.
6) Set the ConcurrentContainer running status to true after `childStarted`
7) Set the ConcurrentContainer running status to false after `childStopped`
8) Call `childStarted` in ConcurrentContainer from KafkaMessageListenerContainer right before publishing ConsumerStartedEvent.
* Fix ContainerGroupSequencer stopParentAndCheckGroup method
This commit would fix the issue when exactly the ConcurrentContainer has to be stopped. As per the earlier logic, running status would not be set to false if any of the container is stopped. This is not correct and modified the logic to set running status to false even if one of the container is stopped. So, it is sufficient to call directly stop API on parent container that would internally check if all the containers are stopped and would execute the callback accordingly.
As per the review comments, this commit reverts the changes related to the ConcurrentContainer `running` status.
Summary of all changes in this PR.
1) 'isChildRunning' API would return true only after all the containers are actually stopped.
2) Add 'stopAbnormally' in a Lock.
3) Call `childStarted` in ConcurrentContainer from KafkaMessageListenerContainer right before publishing ConsumerStartedEvent.
* Revert changes in ContainerGroupSequencer
* Clear previous childContainers during Start call
This commit would change the time at which the childContainers are cleared. Earlier,
childContainers are cleared during `stop` call. But, after this change childContainers
would be cleared only during the next `start` call.
* Clear ChildContainers after all containers stopped.
This commit would include the following changes.
1) Clear all the containers after all the child containers stopped. Previous commit clears only during the fresh start.
2) Publish `ConcurrentContainerStoppedEvent` when the ConcurrentContainer and all the child child containers are stopped. But, previously `ConcurrentContainerStoppedEvent` is emitted when all the containers are stopped.
**Auto-cherry-pick to `3.2.x` & `3.1.x`**
0 commit comments