harshkha3417 commented on PR #7762:
URL: https://github.com/apache/shenyu/pull/7762#issuecomment-6245521187

   Thanks for the thorough review and catch regarding the stuck in-flight flag 
@Aias00!
   
   I've addressed all points and rebased onto the latest `master`:
   1. **In-flight flag lifecycle**:
      - Added `finalInFlight.set(false)` to the scheduled timeout branch so 
tasks cancelled while sitting in the queue immediately clear their in-flight 
guard.
      - Switched from `DiscardPolicy` to `AbortPolicy` and wrapped 
`beatExecutor.submit(...)` in a `try/catch (RejectedExecutionException)` that 
resets the in-flight flag and logs the rejection.
   2. **Defensive deadline parsing**: Added safe parsing for 
`heartbeatTimeoutMs`, falling back to `DEFAULT_DEADLINE_MS` (4000 ms) with a 
warning on `NumberFormatException`.
   3. **Dead code cleanup**: Removed `setBeatExecutor`, `setBeatSender`, 
`getBeatExecutor`, and `getBeatSender`.
   4. **Tests & notes**:
      - Added unit tests covering queued task cancellation flag recovery, task 
rejection flag recovery, and malformed timeout fallback.
      - Updated the PR description noting `deadlineMs <= 0` semantics and 
`BeatSender` interrupt requirements.
      - All tests pass.


-- 
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]

Reply via email to