joewitt commented on PR #11271:
URL: https://github.com/apache/nifi/pull/11271#issuecomment-5655828641

   Thanks
   
   1. Share-group rollback is not proven against a broker
   
   What was true before the PR
   Classic ConsumeKafka rollback is a seek to the last committed offset. 
ConsumeKafkaRebalanceIT and related Docker tests already exercise that the 
record can be consumed again after a failed session.
   
   What is true with the PR
   Share-group rollback is RELEASE (Explicit) or close-and-wait-for-lock 
(Implicit). Docs and Mockito tests describe that. ConsumeKafkaShareGroupIT only 
asserts a happy-path consume. Nothing in Docker produces a record, fails the 
session, and shows the same record coming back.
   
   What I propose specifically and why
   Add one IT: Group Type = Share, Acknowledgement Mode = Explicit, produce one 
record, consume it, fail/roll the session, consume again, assert the same 
payload (and offset if you want) on SUCCESS. That is the behavior this feature 
is selling. Implicit redelivery can stay a follow-up because it needs the 5s 
lock in the test container.
   
   2. The Implicit IT does not show Implicit behavior
   
   What was true before the PR
   There was one consume path. Ack was offset commit.
   
   What is true with the PR
   testShareGroupConsumesProducedRecord and 
testShareGroupConsumesProducedRecordWithImplicitAcknowledgement both wait for a 
FlowFile and assert content. The Implicit test never checks that per-record 
acknowledge() was skipped, that rollback does not RELEASE, or that a second 
consume does not immediately see the record.
   
   What I propose specifically and why
   Keep the consume assertion, then either (a) Mockito-level: Implicit commit() 
/ rollback() never calls ShareConsumer.acknowledge, or (b) Docker: after 
SUCCESS, do not produce again, roll or stop, and assert no duplicate until lock 
expiry. Right now the Implicit test only proves Share Group still consumes.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to