dielhennr commented on a change in pull request #10480:
URL: https://github.com/apache/kafka/pull/10480#discussion_r607383662



##########
File path: raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java
##########
@@ -2252,9 +2247,12 @@ public Long scheduleAtomicAppend(int epoch, List<T> 
records) {
         return append(epoch, records, true);
     }
 
+    @SuppressWarnings("unchecked")
     private Long append(int epoch, List<T> records, boolean isAtomic) {
-        BatchAccumulator<T> accumulator = this.accumulator;
-        if (accumulator == null) {
+        BatchAccumulator<T> accumulator;
+        try {
+            accumulator =  (BatchAccumulator<T>) 
quorum.leaderStateOrThrow().accumulator();

Review comment:
       Removing the cast causes this...
   `Type Mismatch: Cannot convert from BatchAccumulator<Object> to 
BatchAccumulator<T> `
   
   even though this is the signature of accumulator()
   `public BatchAccumulator<T> accumulator()`
   




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to