arijeetmukherjee3108-droid opened a new issue, #41900: URL: https://github.com/apache/beam/issues/41900
### What happened? ### What happened? In `sdks/python/apache_beam/ml/inference/model_manager.py`, `ModelManager.should_spawn_model()` returns True after `_evict_to_make_space()` succeeds without updating `_pending_reservations`, `_total_active_jobs` or `_active_counts[tag]`. As a result: - `_total_active_jobs` stays 0 while the newly spawned model is active, allowing an incoming unknown model to enter isolation mode and delete it mid-inference. - `release_model()` later drives `_total_active_jobs` negative. - `_spawn_new_model()` still subtracts `est_cost` from `_pending_reservations` and decrements `_active_counts[tag]` below 0 if loading fails. ### Issue Priority Priority: 2 (default / most bugs should be filed as P2) ### Issue Components - [x] Component: Python SDK - [ ] Component: Java SDK - [ ] Component: Go SDK - [ ] Component: Typescript SDK - [ ] Component: IO connector - [ ] Component: Beam YAML - [ ] Component: Beam examples - [ ] Component: Beam playground - [ ] Component: Beam katas - [ ] Component: Website - [ ] Component: Infrastructure - [ ] Component: Spark Runner - [ ] Component: Flink Runner - [ ] Component: Prism Runner - [ ] Component: Hazelcast Jet Runner - [ ] Component: Google Cloud Dataflow Runner -- 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]
