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

Introduce multi partition predicate [HZ-1347] #21319

Merged
merged 108 commits into from Aug 25, 2022

Conversation

software-is-art
Copy link
Contributor

@software-is-art software-is-art commented Apr 26, 2022

This is a redux of PR-18171. I'm continuing on from @ashley-taylor.

I've gone with a slightly different approach of making a backwards compatible change to the existing PartitionPredicate interface (instead of making an entirely new interface). This seemed lower risk as existing code with single partition keys will continue to work, while anything new can take advantage of the getPartitionKeys method.

Breaking changes (list specific methods/types/messages):

  • PartitionPredicateImpl constructor

Checklist:

  • Labels (Team:, Type:, Source:, Module:) and Milestone set
  • Label Add to Release Notes or Not Release Notes content set
  • Request reviewers if possible
  • Send backports/forwardports if fix needs to be applied to past/future releases
  • New public APIs have @Nonnull/@Nullable annotations
  • New public APIs have @since tags in Javadoc

@software-is-art software-is-art requested a review from a team as a code owner April 26, 2022 22:23
@hz-devops-test hz-devops-test added the Source: Community PR or issue was opened by a community user label Apr 26, 2022
@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

10 similar comments
@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

Can one of the admins verify this patch?

@devOpsHazelcast
Copy link
Collaborator

devOpsHazelcast commented Apr 26, 2022

CLA assistant check
All committers have signed the CLA.

@vbekiaris
Copy link
Collaborator

run-lab-run

@vbekiaris
Copy link
Collaborator

run-lts-compilers

@hz-devops-test
Copy link

The job Hazelcast-pr-builder of your PR failed. (Hazelcast internal details: build log, artifacts).
Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log file
--------------------------
-------TEST FAILURE-------
--------------------------
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[ERROR]   BinaryCompatibilityTest.readAndVerifyBinaries:127
[INFO] 
[ERROR] Tests run: 4353, Failures: 48, Errors: 0, Skipped: 8
[INFO] 

[ERROR] There are test failures.

@software-is-art
Copy link
Contributor Author

The job Hazelcast-pr-builder of your PR failed. (Hazelcast internal details: build log, artifacts). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log file

I'll need to back out changes made to the binary compatibility test file, and go from there

@software-is-art
Copy link
Contributor Author

@vbekiaris am I able to run the test suite using the same comments?

@Holmistr
Copy link
Contributor

Holmistr commented May 9, 2022

@software-is-art Unfortunately no, due to security reasons (classic cliche :) ). Let me trigger it.

@Holmistr
Copy link
Contributor

Holmistr commented May 9, 2022

run-lab-run

@Holmistr
Copy link
Contributor

Related issue: #21319

@software-is-art
Copy link
Contributor Author

software-is-art commented Aug 9, 2022

@ahmetmircik / @vbekiaris I've updated the serialization binary file for the compatibility tests.

We've dropped the Versioned interface from PartitionPredicateImpl as part of the PR feedback. I forgot that would cause issues with these tests.

@vbekiaris
Copy link
Collaborator

run-lab-run

@mafryer
Copy link

mafryer commented Aug 12, 2022

@ahmetmircik @vbekiaris is there anything more required for this PR?

@mdumandag
Copy link
Contributor

Looking at the recent discussion and changes, I believe the most important one is this one. We should be using toDataWithStrategy not toData here. #21319 (comment)

Also, we have this one, #21319 (comment), but as Ahmet said, it can be done later in a separate PR

@software-is-art
Copy link
Contributor Author

software-is-art commented Aug 15, 2022

Looking at the recent discussion and changes, I believe the most important one is this one. We should be using toDataWithStrategy not toData here. #21319 (comment)

Also, we have this one, #21319 (comment), but as Ahmet said, it can be done later in a separate PR

I added a support for using toDataWithStrategy on a partition id set @ahmetmircik / @mdumandag

@ahmetmircik
Copy link
Member

run-lab-run

@ahmetmircik
Copy link
Member

@mafryer please see this: #21319 (comment)

@software-is-art software-is-art requested review from ahmetmircik and mdumandag and removed request for ahmetmircik and mdumandag August 19, 2022 03:13
Copy link
Member

@ahmetmircik ahmetmircik left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR and addressing reviews patiently.

@ahmetmircik
Copy link
Member

run-lab-run

@ahmetmircik
Copy link
Member

@mdumandag are you ok with latest state of this PR?

* @param <V> the type of values the predicate operates on.
* @throws NullPointerException if partitionKeys or target predicate are {@code null}
* @throws IllegalArgumentException if partitionkeys is an empty set
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: We can add @since tag here


@RunWith(HazelcastParallelClassRunner.class)
@Category({NightlyTest.class})
public class PartitionsPredicatePerformanceTest extends HazelcastTestSupport {
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: Maybe we can do this as well

@mdumandag
Copy link
Contributor

@ahmetmircik The latest state of the PR looks good to me. I just need to confirm one thing before approving the PR. Will we include this in 5.2? If not, we need to update the protocol PR with the correct versioning, but if we are going to include it, it can stay as it is, and I can approve the PR

@ahmetmircik
Copy link
Member

@mdumandag intention is to put this work in 5.2.

@ahmetmircik
Copy link
Member

run-ee-tests

@hz-devops-test
Copy link

The job Hazelcast-pr-builder-ee-tests of your PR failed. (Hazelcast internal details: build log, artifacts).
Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log file
--------------------------
---------SUMMARY----------
--------------------------
[ERROR] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=2048m; support was removed in 8.0
--------------------------
--------------------------
-------TEST FAILURE-------
--------------------------
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   BPlusTreeMemoryTest.testDisposeWhileConcurrentlyAccessing:304 java.lang.AssertionError
[ERROR]   DeviceOperationExecutorTest.testExecutorShutdown:113->assertThreadCount:190 expected:<5> but was:<41>
[INFO] 
[ERROR] Tests run: 10454, Failures: 2, Errors: 0, Skipped: 86
[INFO] 

[ERROR] There are test failures.

@ahmetmircik ahmetmircik changed the title Ability to specify multiple partitions in a predicate query (redux) [HZ-1347] Introduce multi partition predicate [HZ-1347] Aug 25, 2022
@ahmetmircik ahmetmircik merged commit 047c4d3 into hazelcast:master Aug 25, 2022
mdumandag pushed a commit to hazelcast/hazelcast-client-protocol that referenced this pull request Aug 25, 2022
…/hazelcast (#426)

* Added partitionKeysData of type List_Data to PagingPredicateHolder
@software-is-art
Copy link
Contributor Author

LGTM, thanks for the PR and addressing reviews patiently.

Thanks @ahmetmircik for being patient with me as I worked through it all. Looking forward to upgrading to 5.2 when it's out.

All the best for the next release 👏

@AyberkSorgun AyberkSorgun modified the milestones: 5.2 Backlog, 5.2.0 Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add to Release Notes All Languages Should Check Used by clients team to track fixes on the java client that should potentially backported to others Module: Query Source: Community PR or issue was opened by a community user Team: Core Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet