[ 
https://issues.apache.org/jira/browse/KAFKA-7693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16706672#comment-16706672
 ] 

ASF GitHub Bot commented on KAFKA-7693:
---------------------------------------

mingaliu opened a new pull request #5989: KAFKA-7693: Fix SequenceNumber 
overflow in client TransactionManager.
URL: https://github.com/apache/kafka/pull/5989
 
 
   This is to fix KAFKA-7693. The bug is found during operating the Kafka 
cluster. 
   The problem is SequenceNumber is Int and should wrap around when it hit the 
int.MaxValue.
   The bug here is it doesn't wrap around and become negative and throw the 
Exception mentioned in the JIRA-7693.
   
   Verified in the unitest and our daily testing environment.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> "IllegalArgumentException: Invalid negative sequence number used" in Kafka 
> Client
> ---------------------------------------------------------------------------------
>
>                 Key: KAFKA-7693
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7693
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>            Reporter: Ming Liu
>            Priority: Major
>
> When operating Kafka, we have seen Kafka client logging this kind of 
> exception:
> {noformat}
> org.apache.kafka.clients.producer.internals.Sender                  -         
>                      [Producer 
> clientId=interaction-counter-service-2-dev-by-tweet-id-counting-dest-producer,
>  
> transactionalId=interaction-counter-service-2-dev-by-tweet-id-counting-81-transactional-id-gen-1]
>  Uncaught error in kafka producer I/O thread:
> java.lang.IllegalArgumentException: Invalid negative sequence number used
>     at 
> org.apache.kafka.common.record.MemoryRecordsBuilder.validateProducerState(MemoryRecordsBuilder.java:331)
>     at 
> org.apache.kafka.common.record.MemoryRecordsBuilder.close(MemoryRecordsBuilder.java:302)
>     at 
> org.apache.kafka.clients.producer.internals.ProducerBatch.close(ProducerBatch.java:407)
>     at 
> org.apache.kafka.clients.producer.internals.RecordAccumulator.drain(RecordAccumulator.java:572)
>     at 
> org.apache.kafka.clients.producer.internals.Sender.sendProducerData(Sender.java:270)
>     at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:238)
>     at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:163)
>     at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to