Skip to content

Commit c6129a6

Browse files
committed
🐛 topic produce is slow when --record-size is set with and --nb-messages is high #7346
1 parent 846b655 commit c6129a6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

scripts/cli/playground

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23379,6 +23379,12 @@ playground_topic_produce_command() {
2337923379
then
2338023380
log "💫 --record-size is set, forcing --no-null"
2338123381
no_null="true"
23382+
23383+
if [ $nb_messages -ge 100000 ] && [ $record_size -ge 10000 ]
23384+
then
23385+
logwarn "💫 --record-size with high value $record_size and --nb-messages $nb_messages is high, forcing --max-nb-messages-to-generate to 100"
23386+
max_nb_messages_to_generate=100
23387+
fi
2338223388
fi
2338323389

2338423390
function identify_schema() {

scripts/cli/src/commands/topic/produce.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ if [ "$record_size" != 0 ]
168168
then
169169
log "💫 --record-size is set, forcing --no-null"
170170
no_null="true"
171+
172+
if [ $nb_messages -ge 100000 ] && [ $record_size -ge 10000 ]
173+
then
174+
logwarn "💫 --record-size with high value $record_size and --nb-messages $nb_messages is high, forcing --max-nb-messages-to-generate to 100"
175+
max_nb_messages_to_generate=100
176+
fi
171177
fi
172178

173179
function identify_schema() {

0 commit comments

Comments
 (0)