Skip to content

Commit

Permalink
Merge pull request #3 from sandeepkumarcel/IO-104076
Browse files Browse the repository at this point in the history
IO-104076 | fix max call stack error
  • Loading branch information
sandeepkumarcel authored Dec 3, 2024
2 parents 04a3167 + 4bb53ee commit f68b973
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/protocol/requests/fetch/v4/decodeMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const decodeMessages = async decoder => {
while (messagesDecoder.canReadBytes(RECORD_BATCH_OVERHEAD)) {
try {
const recordBatch = await RecordBatchDecoder(messagesDecoder)
records.push(...recordBatch.records)
for(let i = 0; i < recordBatch.records.length; i++) {
records.push(recordBatch.records[i])
}
} catch (e) {
// The tail of the record batches can have incomplete records
// due to how maxBytes works. See https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-FetchAPI
Expand Down

0 comments on commit f68b973

Please sign in to comment.