kafka/checkstyle
Colin Patrick McCabe 59cfc924f5 KAFKA-14996: Handle overly large user operations on the kcontroller (#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. We also now
fail with a PolicyViolationException rather than an UnknownServerException.

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.

Reviewers: David Arthur <mumrah@gmail.com>, Ismael Juma <ijuma@apache.org>, Divij Vaidya <diviv@amazon.com>
2023-05-26 13:29:21 -07:00
..
.scalafmt.conf MINOR: Update Scalafmt to latest version (#12475) 2022-09-12 10:05:15 -04:00
checkstyle.xml KAFKA-14457; Controller metrics should only expose committed data (#12994) 2022-12-20 10:55:14 -08:00
import-control-core.xml KAFKA-9550 Copying log segments to tiered storage in RemoteLogManager (#13487) 2023-04-12 13:55:36 +08:00
import-control-jmh-benchmarks.xml KAFKA-14688 Move package org.apache.kafka.server.log.internals to org.apache.kafka.storage.internals.log (#13213) 2023-02-08 09:22:42 +05:30
import-control.xml KAFKA-14996: Handle overly large user operations on the kcontroller (#13742) 2023-05-26 13:29:21 -07:00
java.header MINOR: improve license header check by providing head file instead of (prefix) header regex 2017-02-28 12:35:04 -08:00
suppressions.xml KAFKA-14840: Support for snapshots during ZK migration (#13461) 2023-05-05 10:06:26 -04:00