kfaraz commented on code in PR #18743:
URL: https://github.com/apache/druid/pull/18743#discussion_r2525697165
##########
server/src/main/java/org/apache/druid/segment/realtime/appenderator/StreamAppenderator.java:
##########
@@ -653,7 +653,7 @@ public ListenableFuture<Object> persistAll(@Nullable final
Committer committer)
numPersistedRows += sink.getNumRowsInMemory();
bytesPersisted += sink.getBytesInMemory();
- final int limit = sink.isWritable() ? hydrants.size() - 1 :
hydrants.size();
+ final int limit = sink.isWritable() ? Integer.max(0, hydrants.size() -
1) : hydrants.size();
Review Comment:
Is it possible to have a small UT for this?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]