Skip to content

Commit

Permalink
MINOR: Fix ProducerPerformance bug when numRecords > Integer.MAX (apa…
Browse files Browse the repository at this point in the history
…che#5956)

Current code will fall into non-stop loop and send more message to broker, and Stat in PerfCallback method record will throw ArrayIndexOutOfBoundsException
  • Loading branch information
seayoun authored and omkreddy committed Nov 29, 2018
1 parent fb9f2d8 commit 4fb5520
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static void main(String[] args) throws Exception {

int currentTransactionSize = 0;
long transactionStartTime = 0;
for (int i = 0; i < numRecords; i++) {
for (long i = 0; i < numRecords; i++) {
if (transactionsEnabled && currentTransactionSize == 0) {
producer.beginTransaction();
transactionStartTime = System.currentTimeMillis();
Expand Down

0 comments on commit 4fb5520

Please sign in to comment.