dengziming commented on a change in pull request #10909:
URL: https://github.com/apache/kafka/pull/10909#discussion_r679836761
##########
File path:
raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java
##########
@@ -148,7 +150,7 @@ private Long append(int epoch, List<T> records, boolean
isAtomic) {
}
if (batch == null) {
- return null;
+ throw new IllegalStateException("Append failed because we
failed to allocate memory to write the batch");
Review comment:
Thank you, I added several `RaftException` and added some unit tests,
and replace 2 original `IllegalArgumentException` with them, I also considered
replacing `NotLeaderOrFollowerException` but it's not very suitable, Please
help to have a look.
--
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]