Execution meta — see plan: #5296
Problem
RocksDBOffsetStore.writeOffset() catches persistence errors and only increments a failure counter. ReliableDispatcher.ack() does not receive a write result, so it removes the pending delivery and can execute a RocketMQ 5 broker ACK even if the subscriber offset or physical cursor was not durably persisted.
Relevant code:
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/offset/RocksDBOffsetStore.java: writeOffset()
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/delivery/ReliableDispatcher.java: ack(String)
Reproduction
- Use an
OffsetStore test double that fails writeOffset.
- Deliver a message with a deferred broker ACK callback.
- ACK the delivery.
- Observe that the dispatcher retires the delivery and may invoke broker ACK despite offset persistence failure.
- Restart from a pull cursor that is ahead of the durable ACK state.
Expected behavior
An ACK must not be considered successful until required durable state is written. If offset/delivery-state persistence fails, EventMesh must not execute source broker ACK and must preserve a retryable delivery state.
Proposed direction
- Change the offset persistence contract to return a result or throw a typed exception.
- Make
ReliableDispatcher.ack() transactional in intent: validate → persist completion/offset → broker ACK → retire delivery.
- On persistence failure, retain or requeue the delivery and return a retryable error.
- Add health/metrics for durable ACK failures.
Acceptance criteria
Suggested labels
bug, reliability, storage, priority:p0
Problem
RocksDBOffsetStore.writeOffset()catches persistence errors and only increments a failure counter.ReliableDispatcher.ack()does not receive a write result, so it removes the pending delivery and can execute a RocketMQ 5 broker ACK even if the subscriber offset or physical cursor was not durably persisted.Relevant code:
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/offset/RocksDBOffsetStore.java:writeOffset()eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/delivery/ReliableDispatcher.java:ack(String)Reproduction
OffsetStoretest double that failswriteOffset.Expected behavior
An ACK must not be considered successful until required durable state is written. If offset/delivery-state persistence fails, EventMesh must not execute source broker ACK and must preserve a retryable delivery state.
Proposed direction
ReliableDispatcher.ack()transactional in intent: validate → persist completion/offset → broker ACK → retire delivery.Acceptance criteria
Suggested labels
bug,reliability,storage,priority:p0