Skip to content

[Fix][Zeta] Fix IMap file storage losing concurrent writes - #13802

Open
dybyte wants to merge 1 commit into
apache:devfrom
dybyte:fix/imap-wal-concurrent-writes
Open

dybyte wants to merge 1 commit into
apache:devfrom
dybyte:fix/imap-wal-concurrent-writes

Conversation

@dybyte

@dybyte dybyte commented Dec 1, 2026

Copy link
Copy Markdown
Member

Purpose of this pull request

WALDisruptor used ProducerType.SINGLE, but Hazelcast calls IMapFileStorage.store() and delete() from several partition threads at once. Two producers could claim the same ring buffer slot, so one event was overwritten and never written to the WAL. The caller only got false after the default 60 s write timeout, and FileMapStore ignores that result, so the entry was silently missing after a full cluster restart.

The ring buffer now uses ProducerType.MULTI.

Does this PR introduce any user-facing change?

No

How was this patch tested?

  • New WALDisruptorTest#testConcurrentProducers: 8 threads publish 4000 events in total and all must be acknowledged. It fails without the fix (31 of 31 runs) and passes with it.
  • Manual check on a Hazelcast member with FileMapStoreFactory: 2400 puts from 8 threads, then a restart. 7 entries were lost without the fix, none with it.
  • ClusterFaultToleranceIT is not changed; it already covers recovery after a full restart.

Check list

@github-actions github-actions Bot added the Zeta label Dec 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant