Skip to content

CLIENT-5011 server side idx selection - #71

Merged
paul-brackin merged 52 commits into
devfrom
CLIENT-5011-server-side-idx-selection
Aug 1, 2026
Merged

CLIENT-5011 server side idx selection#71
paul-brackin merged 52 commits into
devfrom
CLIENT-5011-server-side-idx-selection

Conversation

@gagan405

Copy link
Copy Markdown

Related: aerospike/aerospike-client-python-async#85

This enables server side index selection. The base branch is CLIENT-4878 as index selection will go along with AEL parsing.

@gagan405
gagan405 changed the base branch from CLIENT-4878-serverside-ael-parsing to dev July 30, 2026 00:49
@gagan405
gagan405 changed the base branch from dev to CLIENT-4878-serverside-ael-parsing July 30, 2026 00:50
Points aerospike-async at 9bd73f6 (core 1557751) on the query-selection branch.
@gagan405
gagan405 changed the base branch from CLIENT-4878-serverside-ael-parsing to dev July 30, 2026 17:18
@paul-brackin
paul-brackin self-requested a review July 30, 2026 23:45

@paul-brackin paul-brackin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will likely require another pass as it was just a lot.

In addition to all the line items.. a couple more thoughts:

  • In PAC #85: Version.supports_query_selection() hard-codes true. I would give it the same dark-launch treatment as feature_gates.py here: return false (or the real core check) until the server merges the optimizer; otherwise the moment PSDK's gate flips, PAC reports support against servers that can't serve field 44.

  • Naming: PSDK's supports_server_compiled_ael vs JSDK's supportsAel(). This is the one genuine naming divergence. PSDK's name is the better one as long as we still have client-side AEL. But as soon as client-side AEL goes away, JSDK's name becomes the better choice. My understanding is client-side AEL is going away & if that is true, we should align the PSDK's flag the the JSDK's; Vice-versa, if that is not true.

Comment thread aerospike_sdk/operations_shared.py
Comment thread aerospike_sdk/operations_shared.py Outdated
Comment thread aerospike_sdk/query_shared.py
Comment thread aerospike_sdk/query_shared.py Outdated
Comment thread tests/unit/expression_ops_test.py Outdated
Comment thread tests/integration/async/exp_test.py Outdated
Comment thread tests/integration/async/conftest.py Outdated
Comment thread tests/unit/query_where_test.py Outdated
Comment thread tests/integration/conftest.py Outdated
Comment thread conftest.py Outdated
@gagan405

Copy link
Copy Markdown
Author

In PAC #85: Version.supports_query_selection() hard-codes true. I would give it the same dark-launch treatment as feature_gates.py here: return false (or the real core check) until the server merges the optimizer; otherwise the moment PSDK's gate flips, PAC reports support against servers that can't serve field 44.

I will mark that as False. It was set to true as QA is testing against a server release that supports Index Optimization.
Also, server side has already merged. So, we can actually cleanup quite a lot.

Naming: PSDK's supports_server_compiled_ael vs JSDK's supportsAel(). This is the one genuine naming divergence. PSDK's name is the better one as long as we still have client-side AEL. But as soon as client-side AEL goes away, JSDK's name becomes the better choice. My understanding is client-side AEL is going away & if that is true, we should align the PSDK's flag the the JSDK's; Vice-versa, if that is not true.

Client side AEL will go away. I will align the names, when we clean up the client side parsing.

@gagan405
gagan405 requested a review from paul-brackin July 31, 2026 16:50
Comment thread tests/integration/async/query_planner_collection_cdt_test.py Outdated
Comment thread tests/integration/conftest.py
Comment thread tests/unit/query_server_selection_test.py
@gagan405
gagan405 requested a review from paul-brackin July 31, 2026 21:41

@paul-brackin paul-brackin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

OK other than the line items, some thoughts:

  • PSDK gate logic is scattered where JSDK centralizes. Five sites each do their own flag lookup + materialize (where(), default_where(), ops helper, QueryBinBuilder.select_from, background builders). JSDK routes everything through AelMaterializer. ael/server_filter.py is the seed of exactly that; grow it into the single materializer (takes the flag source, one code path), and the eventual client-AEL deletion becomes a one-module change instead of a five-site hunt.

  • Plan logging parity. JSDK debug-logs the resulting plan (CLIENT-5066: selection, index name); PSDK's debug line logs only "explain→execute" intent. Log plan.selection/index_name after explain; it's the field-diagnosis tool for exactly the probe-3 class of question ("did my query use the index?").

Comment thread aerospike_sdk/ael/server_filter.py Outdated
Comment thread aerospike_sdk/operations_shared.py
Comment thread aerospike_sdk/query_shared.py Outdated
Comment thread aerospike_sdk/query_shared.py
Comment thread aerospike_sdk/query_shared.py Outdated
Comment thread aerospike_sdk/query_shared.py
Comment thread aerospike_sdk/query_shared.py Outdated
@gagan405
gagan405 requested a review from paul-brackin August 1, 2026 01:26
@paul-brackin
paul-brackin merged commit 997abae into dev Aug 1, 2026
18 checks passed
@paul-brackin
paul-brackin deleted the CLIENT-5011-server-side-idx-selection branch August 1, 2026 14:24
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.

2 participants