Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MapEventJournal to capture LOADED events #13667

Closed
blazember opened this issue Aug 30, 2018 · 1 comment
Closed

MapEventJournal to capture LOADED events #13667

blazember opened this issue Aug 30, 2018 · 1 comment

Comments

@blazember
Copy link
Contributor

@blazember blazember commented Aug 30, 2018

MapEventJournal doesn't have method for writing LOADED events, it writes ADDED events instead. MapEventJournal#writeLoadedEvent() should be added along with RecordStoreMutationObserver#onLoadRecord().

Events written to the journal should be in sync with the published events. Whether load writes LOADED or ADDED events to the journal should be based on DefaultRecordStore#canPublishLoadEvent.

See https://github.com/hazelcast/hazelcast/blob/master/hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/DefaultRecordStore.java#L328-L336.

@blazember blazember added this to the 3.11 milestone Aug 30, 2018
@blazember blazember self-assigned this Aug 30, 2018
blazember added a commit to blazember/hazelcast that referenced this issue Aug 30, 2018
blazember added a commit to blazember/hazelcast that referenced this issue Aug 31, 2018
- Extend `MapEventJournal` with `writeLoadEvent`
- Extend `RecordStoreMutationObserver` with `onLoadRecord`
- Call `mutationObserver.onLoadRecord()` from `DefaultRecordStore.loadRecordOrNull()`
- Call either `onLoadRecord()` or `onPutRecord()` from `DefaultRecordStore.putFromLoadInternal()` based on `DefaultRecordStore.canPublishLoadEvent()`
- Update event journal tests

Implements hazelcast#13667
blazember added a commit to blazember/hazelcast that referenced this issue Aug 31, 2018
- Extend `MapEventJournal` with `writeLoadEvent`
- Extend `RecordStoreMutationObserver` with `onLoadRecord`
- Call `mutationObserver.onLoadRecord()` from `DefaultRecordStore.loadRecordOrNull()`
- Call either `onLoadRecord()` or `onPutRecord()` from `DefaultRecordStore.putFromLoadInternal()` based on `DefaultRecordStore.canPublishLoadEvent()`
- Update event journal tests

Implements hazelcast#13667
blazember added a commit that referenced this issue Sep 3, 2018
- Extend `MapEventJournal` with `writeLoadEvent`
- Extend `RecordStoreMutationObserver` with `onLoadRecord`
- Call `mutationObserver.onLoadRecord()` from `DefaultRecordStore.loadRecordOrNull()`
- Call either `onLoadRecord()` or `onPutRecord()` from `DefaultRecordStore.putFromLoadInternal()` based on `DefaultRecordStore.canPublishLoadEvent()`
- Update event journal tests

Implements #13667
@mmedenjak
Copy link
Contributor

@mmedenjak mmedenjak commented Sep 6, 2018

Closing as the PR has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.