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

   Thanks for the fix! The new tests correctly catch the previously ignored 
send failure.
   
   I agree with @sangkyoonnam that we should flush before waiting on the send 
future, so each synchronous state write avoids Kafka 4.0’s default linger delay:
   
   ```java
   Future<RecordMetadata> ack = producer.send(kafkaRecord);
   producer.flush();
   ack.get();
   actionStates.put(stateKey, state);
   ```
   
   Could we also move the relevant contract into `put()`’s Javadoc and remove 
the two Markdown files? The wording should avoid promising that the cache 
remains unchanged on failure, since callers can already mutate a cached 
`ActionState` before calling `put()`.


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