cmccabe opened a new pull request, #13742:
URL: https://github.com/apache/kafka/pull/13742

   Previously, if a user tried to perform an overly large batch operation on 
the KRaft controller (such as creating a million topics), we would create a 
very large number of records in memory. Our attempt to write these records to 
the Raft layer would fail, because there were too many to fit in an atomic 
batch. This failure, in turn, would trigger a controller failover.
   
   (Note: I am assuming here that no topic creation policy was in place that 
would prevent the creation of a million topics. I am also assuming that the 
user operation must be done atomically, which is true for all current user 
operations, since we have not implemented KIP-868 yet.)
   
   With this PR, we fail immediately when the number of records we have 
generated exceeds the threshold that we can apply. This failure does not 
generate a controller failover.
   
   In order to implement this in a simple way, this PR adds the BoundedList 
class, which wraps any list and adds a maximum length. Attempts to grow the 
list beyond this length cause an exception to be thrown.


-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to