wellkilo commented on PR #1177:
URL: https://github.com/apache/flink-agents/pull/1177#issuecomment-6117032659

   Thanks @sangkyoonnam and @wenjin272 — agreed on all three points, and the 
timing data is convincing. Addressed in b66fd26.
   
   **Ordering.** Reordered to `send(); flush(); ack.get();` so `flush()` still 
bypasses the linger delay (`createProducerProp()` doesn't set `linger.ms`, and 
4.0 defaults it to 5 ms). `ack.get()` still runs before the cache insert, so a 
record-level async failure is still surfaced. I kept the reorder instead of 
setting `linger.ms = 0`, to avoid a producer-config change and stay close to 
main.
   
   **Interrupts.** Flipped the interrupt test's `assertThat(flushCalled)` to 
`isTrue()` to pin the ordering. An interrupt while blocked in `flush()` keeps 
main's behavior (Kafka's `InterruptException` wrapped in the generic 
`RuntimeException`, flag restored); the new `get()` path rethrows 
`InterruptedException` with the flag restored. I haven't tested a real 
interrupt either.
   
   **Docs.** Removed `runtime/API.md` and `runtime/Method.md`, and moved the 
contract onto `KafkaActionStateStore.put(...)`'s Javadoc. Dropped the "cache 
unchanged" wording — the Javadoc now only says the state isn't added to the 
cache when send/ack/flush fails, which is what `put()` actually controls.
   
   The PR description's flow and interaction table are updated to match the new 
order.
   


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