[jira] [Updated] (KAFKA-14657) Admin.fenceProducers fails when Producer has ongoing transaction - but Producer gets fenced

2023-01-27 Thread Edoardo Comar (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-14657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Edoardo Comar updated KAFKA-14657:
--
Description: 
Admin.fenceProducers() 
fails with a ConcurrentTransactionsException if invoked when a Producer has a 
transaction ongoing.
However, further attempts by that producer to produce fail with 
InvalidProducerEpochException and the producer is not re-usable, 
cannot abort/commit as it is fenced.

An InvalidProducerEpochException is also logged as error on the broker

[2023-01-27 17:16:32,220] ERROR [ReplicaManager broker=1] Error processing 
append operation on partition topic-0 (kafka.server.ReplicaManager)
org.apache.kafka.common.errors.InvalidProducerEpochException: Epoch of producer 
1062 at offset 84 in topic-0 is 0, which is smaller than the last seen epoch

 

Conversely, if Admin.fenceProducers() 
is invoked while there is no open transaction, the call succeeds and further 
attempts by that producer to produce fail with ProducerFenced.

see attached snippets

As the caller of Admin.fenceProducers() is likely unaware of the producers 
state, the call should succeed regardless

  was:
Admin.fenceProducers() 
fails with a ConcurrentTransactionsException if invoked when a Producer has a 
transaction ongoing.
However, further attempts by that producer to produce fail with 
InvalidProducerEpochException and the producer is not re-usable, 
cannot abort/commit as it is fenced.

Conversely, if Admin.fenceProducers() 
is invoked while there is no open transaction, the call succeeds and further 
attempts by that producer to produce fail with ProducerFenced.

see attached snippets

As the caller of Admin.fenceProducers() is likely unaware of the producers 
state, the call should succeed regardless


> Admin.fenceProducers fails when Producer has ongoing transaction - but 
> Producer gets fenced
> ---
>
> Key: KAFKA-14657
> URL: https://issues.apache.org/jira/browse/KAFKA-14657
> Project: Kafka
>  Issue Type: Bug
>  Components: admin
>Reporter: Edoardo Comar
>Priority: Major
> Attachments: FenceProducerDuringTx.java, FenceProducerOutsideTx.java
>
>
> Admin.fenceProducers() 
> fails with a ConcurrentTransactionsException if invoked when a Producer has a 
> transaction ongoing.
> However, further attempts by that producer to produce fail with 
> InvalidProducerEpochException and the producer is not re-usable, 
> cannot abort/commit as it is fenced.
> An InvalidProducerEpochException is also logged as error on the broker
> [2023-01-27 17:16:32,220] ERROR [ReplicaManager broker=1] Error processing 
> append operation on partition topic-0 (kafka.server.ReplicaManager)
> org.apache.kafka.common.errors.InvalidProducerEpochException: Epoch of 
> producer 1062 at offset 84 in topic-0 is 0, which is smaller than the last 
> seen epoch
>  
> Conversely, if Admin.fenceProducers() 
> is invoked while there is no open transaction, the call succeeds and further 
> attempts by that producer to produce fail with ProducerFenced.
> see attached snippets
> As the caller of Admin.fenceProducers() is likely unaware of the producers 
> state, the call should succeed regardless



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (KAFKA-14657) Admin.fenceProducers fails when Producer has ongoing transaction - but Producer gets fenced

2023-01-27 Thread Edoardo Comar (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-14657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Edoardo Comar updated KAFKA-14657:
--
Description: 
Admin.fenceProducers() 
fails with a ConcurrentTransactionsException if invoked when a Producer has a 
transaction ongoing.
However, further attempts by that producer to produce fail with 
InvalidProducerEpochException and the producer is not re-usable, 
cannot abort/commit as it is fenced.

Conversely, if Admin.fenceProducers() 
is invoked while there is no open transaction, the call succeeds and further 
attempts by that producer to produce fail with ProducerFenced.

see attached snippets

As the caller of Admin.fenceProducers() is likely unaware of the producers 
state, the call should succeed regardless

  was:
{{Admin.fenceProducers() }}
fails with a ConcurrentTransactionsException if invoked when a Producer has a 
transaction ongoing.
However, further attempts by that producer to produce fail with 
InvalidProducerEpochException and the producer is not re-usable, 
cannot abort/commit as it is fenced.

Conversely, if 
{{Admin.fenceProducers() }}
is invoked while there is no open transaction, the call succeeds and further 
attempts by that producer to produce fail with ProducerFenced.

see attached snippets 

As the caller of {{Admin.fenceProducers() }} the call should succeed regardless 
of the state of the producer


> Admin.fenceProducers fails when Producer has ongoing transaction - but 
> Producer gets fenced
> ---
>
> Key: KAFKA-14657
> URL: https://issues.apache.org/jira/browse/KAFKA-14657
> Project: Kafka
>  Issue Type: Bug
>  Components: admin
>Reporter: Edoardo Comar
>Priority: Major
> Attachments: FenceProducerDuringTx.java, FenceProducerOutsideTx.java
>
>
> Admin.fenceProducers() 
> fails with a ConcurrentTransactionsException if invoked when a Producer has a 
> transaction ongoing.
> However, further attempts by that producer to produce fail with 
> InvalidProducerEpochException and the producer is not re-usable, 
> cannot abort/commit as it is fenced.
> Conversely, if Admin.fenceProducers() 
> is invoked while there is no open transaction, the call succeeds and further 
> attempts by that producer to produce fail with ProducerFenced.
> see attached snippets
> As the caller of Admin.fenceProducers() is likely unaware of the producers 
> state, the call should succeed regardless



--
This message was sent by Atlassian Jira
(v8.20.10#820010)