Part of #423: Race condition potential in ApplicationManager concurrent operations
Problem
The shutdown() method (line 970-986) iterates over all applications while other threads may be deploying or undeploying apps concurrently. A simple mutex would serialize all operations unnecessarily, but a ReadWriteLock would allow concurrent deploys/undeploys while giving shutdown exclusive access.
Location
platform-core/src/main/java/org/flossware/platform/core/ApplicationManager.java:970-986
Tasks
Acceptance Criteria
shutdown() has exclusive access to the applications map during iteration
- Concurrent
deploy()/undeploy() calls do not interfere with shutdown
- Normal deploy/undeploy operations remain concurrent with each other
Part of #423: Race condition potential in ApplicationManager concurrent operations
Problem
The
shutdown()method (line 970-986) iterates over all applications while other threads may be deploying or undeploying apps concurrently. A simple mutex would serialize all operations unnecessarily, but a ReadWriteLock would allow concurrent deploys/undeploys while giving shutdown exclusive access.Location
platform-core/src/main/java/org/flossware/platform/core/ApplicationManager.java:970-986Tasks
ReentrantReadWriteLockfor the applications mapdeploy()andundeploy()acquire the read lock (allows concurrency)shutdown()acquires the write lock (exclusive access during bulk iteration)Acceptance Criteria
shutdown()has exclusive access to the applications map during iterationdeploy()/undeploy()calls do not interfere with shutdown