goutamadwant opened a new pull request, #26124:
URL: https://github.com/apache/pulsar/pull/26124
Fixes #26113
### Motivation
Geo-replication can rewind the source cursor after a head-of-queue send
failure while later pipelined sends have already advanced the replicated
deduplication watermark on the remote cluster. If the rewound head message is
then acknowledged as a duplicate with target position `-1:-1`, completing that
send as success lets the source cursor move past an entry that was not
confirmed persisted on the remote side.
### Modifications
- Treat a duplicate acknowledgement without a target position as a failed
send when the rewound source position is earlier than the last persisted source
position.
- Keep the existing success path for valid target positions and for
duplicate acknowledgements at the current persisted source position.
- Add focused `GeoReplicationProducerImpl` tests for the failed rewind path
and the success cases that should remain unchanged.
### Verifying this change
- [x] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
- Added `GeoReplicationProducerImplTest` coverage for rewound duplicate
acknowledgements with no target position, valid target positions, and duplicate
acknowledgements at the current persisted source position.
- `./gradlew :pulsar-client-original:test --tests
"org.apache.pulsar.client.impl.GeoReplicationProducerImplTest"
-PtestRetryCount=0 --no-build-cache --rerun-tasks`
- `./gradlew :pulsar-client-original:spotlessCheck
:pulsar-client-original:checkstyleMain :pulsar-client-original:checkstyleTest`
- `./gradlew quickCheck`
### Does this pull request potentially affect one of the following parts:
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [x] Anything that affects deployment
This changes a geo-replication failure path from completing a duplicate
rewind acknowledgement as success to failing the send callback, so the source
cursor does not advance past an entry that was not confirmed persisted on the
remote side.
--
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]