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

[FORWARDPORT] Make comparators able to act on keys and values #15380

Merged

Conversation

taburet
Copy link
Contributor

@taburet taburet commented Jul 26, 2019

A custom paging predicate comparator may act on keys and values at the
same time even if only the keys were requested, e.g. using IMap.keySet
call. Before this fix only keys were fetched for IMap.keySet, making
comparators unable to act on values.

Original maintenance PR: #15324

@mmedenjak
Copy link
Contributor

@taburet I think we can merge this with a single approval. WDYT?

@taburet
Copy link
Contributor Author

taburet commented Aug 9, 2019

@mmedenjak it's better to review it, it's not a clean cherry-pick, mostly because the client code was merged into the core.

@@ -444,6 +445,32 @@ public void testLargePageSizeIsNotCausingIndexOutBoundsExceptions() {
}
}

@Test
public void testCustomComparatorAbleToActOnKeysAndValues() {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems in the PagingPredicateTest we have exactly the same test. Can we somehow avoid code duplication?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Merged member and client paging predicate tests together.

A custom paging predicate comparator may act on keys and values at the
same time even if only the keys were requested, e.g. using `IMap.keySet`
call. Before this fix only keys were fetched for `IMap.keySet`, making
comparators unable to act on values.
@taburet taburet force-pushed the fix/4.0/paging-predicate-comparators branch from 6037b49 to ac88eb2 Compare August 17, 2019 08:42
@taburet taburet merged commit 5fffd70 into hazelcast:master Aug 27, 2019
@taburet taburet deleted the fix/4.0/paging-predicate-comparators branch August 27, 2019 08:12
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants