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

Near cache consistency improvements #9660

Merged
merged 1 commit into from Feb 7, 2017

Conversation

ahmetmircik
Copy link
Member

@ahmetmircik ahmetmircik commented Jan 16, 2017

  • Removed stale read probability during near cache updates.
  • Removed KeyStateMarker and introduced record states. A record can have 3 states now UPDATE_STARTED, REMOVE_REQUESTED, READ_PERMITTED. This new approach will help to utilize near cache more effectively compared to existing approach. Because in existing approach, only one thread can operate on a partition, if other threads want to put some other keys belonging to that partition, they can't do it because partition is already locked by first thread.
  • fixes Improve key state marking in nearcached getAll #9403
  • Implemented computeIfPresent and merge for IConcurrentMap and introduced IBiFunction

PS: EE part will be introduced upon end of this PRs' review.

@ahmetmircik ahmetmircik changed the title wip2 Near cache consistency improvements Jan 20, 2017
@ahmetmircik ahmetmircik changed the title Near cache consistency improvements [DONT MERGE] Near cache consistency improvements Jan 20, 2017
@ahmetmircik ahmetmircik added this to the 3.8 milestone Jan 20, 2017
@ahmetmircik ahmetmircik force-pushed the fix/3.8/cons2stDraft branch 3 times, most recently from 4949926 to 85ce61b Compare January 25, 2017 22:49
@ahmetmircik ahmetmircik force-pushed the fix/3.8/cons2stDraft branch 2 times, most recently from a54515f to bbfa48d Compare January 30, 2017 09:25
@jerrinot
Copy link
Contributor

jerrinot commented Feb 2, 2017

@ahmetmircik: what's preventing to have this merged?

@ahmetmircik
Copy link
Member Author

@jerrinot ee counterpart is not ready yet.

@ahmetmircik ahmetmircik force-pushed the fix/3.8/cons2stDraft branch 2 times, most recently from 826053e to 22adb93 Compare February 6, 2017 17:01
@Donnerbart
Copy link
Contributor

Fixes #9536

@ahmetmircik ahmetmircik force-pushed the fix/3.8/cons2stDraft branch 3 times, most recently from b7ffc81 to 3f3b5de Compare February 6, 2017 23:21
@devOpsHazelcast
Copy link
Collaborator

Test PASSed.

@devOpsHazelcast
Copy link
Collaborator

Test PASSed.

@ahmetmircik ahmetmircik changed the title [DONT MERGE] Near cache consistency improvements Near cache consistency improvements Feb 7, 2017
@devOpsHazelcast
Copy link
Collaborator

Test PASSed.

Copy link
Collaborator

@vbekiaris vbekiaris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 with a minor comment to update NearCacheDataRecordStore.getRecordStorageMemoryCost to include the additional long's cost for recordState field

@ahmetmircik
Copy link
Member Author

@vbekiaris fixed

@devOpsHazelcast
Copy link
Collaborator

Test PASSed.

@devOpsHazelcast
Copy link
Collaborator

- Removed stale read probability during near cache updates.
- Removed `KeyStateMarker` and introduced record states. A record can have 2 main states now RESERVED, READ_PERMITTED. This new approach will help to utilize near cache more effectively compared to existing approach. Because in existing approach, only one thread can operate on a partition, if other threads want to put some other keys belonging to that partition, they can't do it because partition is already locked by first thread.
- fixes hazelcast#9403
- Implemented `computeIfPresent` for `IConcurrentMap` and introduced `IBiFunction`
@devOpsHazelcast
Copy link
Collaborator

Test PASSed.

1 similar comment
@devOpsHazelcast
Copy link
Collaborator

Test PASSed.

@ahmetmircik ahmetmircik merged commit 601a677 into hazelcast:master Feb 7, 2017
@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Internal PR or issue was opened by an employee Team: Core Type: Defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve key state marking in nearcached getAll
7 participants