CLIENT-5011 server side idx selection - #71
Conversation
…g. requires fixing
Points aerospike-async at 9bd73f6 (core 1557751) on the query-selection branch.
paul-brackin
left a comment
There was a problem hiding this comment.
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.
I will mark that as False. It was set to true as QA is testing against a server release that supports Index Optimization.
Client side AEL will go away. I will align the names, when we clean up the client side parsing. |
paul-brackin
left a comment
There was a problem hiding this comment.
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?").
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.