-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
EntryProcessor should be able to access other entries that are on the same Partition. #964
Comments
It's already possible to access / modify data on the same partition. You |
how? do you have a code sample? I couldn't see it? Can I just access the IMap? |
Cool, would this trigger entrylisteners for the other map properly too? |
I just tested this and I get an error: |
Can you post your code? ~Sent from mobile |
Simplified version of what I want to do. Basically two maps, sessions and channels, where channels belong to sessions. The "channel" key is a PartitionAwareKey and I want to store a channel atomically with the storage of the session, while keeping them in separate maps. I also want to make sure that Events are generated for the "channel" map I touch. Here is some abbreviated code: import com.google.common.base.Optional; import java.util.Map;
} |
Christer, Can you try the following: Test testMapEntryProcessorPartitionAware() in https://github.com/hazelcast/hazelcast/blob/master/hazelcast/src/test/java/com/hazelcast/map/EntryProcessorTest.java |
Fuad and Mehmet, That solves my immediate concern, thanks! Now - a question: What about the backup-operations? Will they be happening one by one for each invoked EntryProcessor on that thread? Preferably this would be "batched" up such that there is only one roundtrip for the backup operations. Thanks, |
Currently backup ops are executed one by one. |
Import of #26271 **Original PR description:** <!-- Contributing to Hazelcast and looking for a challenge? Why don't you check out our open positions? https://hazelcast.pinpointhq.com/ --> Updates example configuration files for TPC comments Checklist: - [ ] Labels (`Team:`, `Type:`, `Source:`, `Module:`) and Milestone set - [ ] Add `Add to Release Notes` label if changes should be mentioned in release notes or `Not Release Notes content` if changes are not relevant for release notes - [x] Request reviewers if possible - [ ] New public APIs have `@Nonnull/@Nullable` annotations - [ ] New public APIs have `@since` tags in Javadoc - [ ] Send backports/forwardports if fix needs to be applied to past/future releases Imported changes: - 000adfc DOCS-809: Updates example configuration files for TPC com... - 709f825 Update hazelcast/src/main/resources/hazelcast-full-exampl... Closes #26271 Co-authored-by: Oliver Howell <oliver.howell@hazelcast.com> GitOrigin-RevId: fdf36b0aa683917fe0193032cf4eafa9f2b91fcd
It would be nice if we “from an entryprocessor” could also modify entries in related maps on the same partition. Lets say you have an “order” map and an “order items” map with a partitionaware key related to the order. You may also want to update the order items (as a separate map) under the same lock.
We have one thread per partition, that makes the implementation easier. This way one can do an atomic operation that spans multiple data structures on the same Partition.
The text was updated successfully, but these errors were encountered: