José Armando García Sancio created KAFKA-20714:
--------------------------------------------------
Summary: Refactor KRaft API around message handling
Key: KAFKA-20714
URL: https://issues.apache.org/jira/browse/KAFKA-20714
Project: Kafka
Issue Type: Bug
Reporter: José Armando García Sancio
Assignee: José Armando García Sancio
The current KRaft API embeds CompletableFuture fields directly in
RaftRequest and RaftResponse objects via the completion field. This
design has several drawbacks. First, it creates API clarity issues
because requests and responses are data carriers, but the embedded
future makes them also responsible for asynchronous completion
signaling. Second, it creates ownership confusion about who owns the
lifecycle of the embedded future. Third, it reduces type safety because
the completion future is exposed as a mutable field, allowing external
code to complete it incorrectly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)