Skip to content

IGNITE-22141 C++ 3.0: Implement Partition Awareness for C++ client#7966

Merged
isapego merged 30 commits intoapache:mainfrom
Erixonich:ignite-22141
Apr 14, 2026
Merged

IGNITE-22141 C++ 3.0: Implement Partition Awareness for C++ client#7966
isapego merged 30 commits intoapache:mainfrom
Erixonich:ignite-22141

Conversation

@Erixonich
Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/IGNITE-22141

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements initial partition-awareness plumbing for the Ignite 3 C++ client by introducing a partition-assignment protocol message, tracking assignment timestamps, and routing certain key-based requests to a preferred node. Adds C++ integration tests that validate routing behavior via an ASIO proxy that can intercept client/server messages.

Changes:

  • Add protocol + client-side state for partition assignment (new op PARTITION_ASSIGNMENT_GET, parsing/writing helpers, assignment timestamp propagation).
  • Route C++ TUPLE_GET through a preferred-node selection based on collocated columns hash.
  • Add C++ partition-awareness integration test infrastructure (proxy message listener + test job on Java side to expose partition distribution).

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
modules/runner/src/testFixtures/java/org/apache/ignite/internal/runner/app/Jobs.java Adds a compute job to return Java-calculated partition distribution for C++ tests.
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/PlatformTestNodeRunner.java Import changes (currently unused).
modules/platforms/cpp/tests/test-common/proxy/message_listener.h New proxy listener that decodes length-prefixed messages into structured client/server messages.
modules/platforms/cpp/tests/test-common/proxy/asio_proxy.h Proxy adjustments for raw message type + improved logging and capture.
modules/platforms/cpp/tests/test-common/CMakeLists.txt Links test-common with asio and msgpack-c.
modules/platforms/cpp/tests/fake_server/proxy/message_listener.h Removes old minimal message listener (replaced by test-common version).
modules/platforms/cpp/tests/fake_server/connection_test.cpp Switches to including proxy header from include path.
modules/platforms/cpp/tests/fake_server/CMakeLists.txt Removes direct asio link from fake_server test target (now via ignite-test-common).
modules/platforms/cpp/tests/client-test/partition_awareness_test.cpp New integration test validating partition-aware routing for get via proxy interception.
modules/platforms/cpp/tests/client-test/ignite_runner_suite.h Adds job constant and __partition_id pseudocolumn constant for tests.
modules/platforms/cpp/tests/client-test/CMakeLists.txt Adds the new partition awareness test to the client-test target.
modules/platforms/cpp/ignite/protocol/partition_assignment.h New partition assignment data structure.
modules/platforms/cpp/ignite/protocol/messages.h Exposes partition-assignment read/write APIs and adds node id/name to handshake response.
modules/platforms/cpp/ignite/protocol/messages.cpp Parses node id/name from handshake and implements partition-assignment request/response helpers.
modules/platforms/cpp/ignite/protocol/client_operation.h Adds PARTITION_ASSIGNMENT_GET op code.
modules/platforms/cpp/ignite/common/uuid.h Adds uuid::from_string for tests/utilities.
modules/platforms/cpp/ignite/common/uuid_test.cpp Adds unit test coverage for uuid::from_string.
modules/platforms/cpp/ignite/client/detail/table/table_impl.h Adds partition-assignment state/mutex and APIs to load/compute preferred node.
modules/platforms/cpp/ignite/client/detail/table/table_impl.cpp Loads assignment and routes TUPLE_GET using preferred node name derived from key hash.
modules/platforms/cpp/ignite/client/detail/table/schema.h Adds collocated_columns to schema for partition-hash calculation.
modules/platforms/cpp/ignite/client/detail/node_connection.h Adds node id/name fields; introduces send-failure logging behavior (currently via stdout).
modules/platforms/cpp/ignite/client/detail/node_connection.cpp Propagates PARTITION_ASSIGNMENT_CHANGED flag to cluster connection and stores handshake node id/name.
modules/platforms/cpp/ignite/client/detail/connection_event_handler.h Adds partition-assignment-changed callback.
modules/platforms/cpp/ignite/client/detail/cluster_connection.h Adds assignment timestamp + preferred-node routing hooks.
modules/platforms/cpp/ignite/client/detail/cluster_connection.cpp Updates assignment timestamp on notifications and selects preferred channel by node name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

some refactoring
added PA for other methods
added check in test that PA was assigned before running the tests
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Erixonich Erixonich requested a review from Copilot April 13, 2026 04:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Erixonich Erixonich requested a review from isapego April 14, 2026 12:34
@isapego isapego merged commit bd26df6 into apache:main Apr 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants