forked from digma-ai/forkof-spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Issue Description
The MonitorService is experiencing frequent IllegalStateException occurrences due to improper state management and error handling.
Current Behavior
- Service throws unhandled IllegalStateException with "monitor failure" message
- isRunning() method always returns false
- No proper state management or recovery mechanisms
- Deliberate exception throwing in monitor() method
Root Cause
- Missing proper state management
- Incorrect implementation of isRunning()
- No error handling or recovery logic
- Deliberate exception throwing for testing
Solution
A PR has been created (#70) that implements the following fixes:
- Added ServiceState enum for proper state tracking
- Fixed isRunning() to return actual state
- Implemented proper monitor() method with health checks
- Added retry mechanism with exponential backoff
- Improved error handling and logging
- Added proper state transitions
Related
- PR Archive 4 #70
- Error ID: b2f3824a-3655-11f0-bc70-ca59c7e8e81d
Reactions are currently unavailable