Repository navigation
Translate search_after into a cursorMark built from the sort values - #181
Draft
serhiy-bzhezytskyy wants to merge 17 commits into
Draft
serhiy-bzhezytskyy wants to merge 17 commits into
serhiy-bzhezytskyy wants to merge 17 commits into
Conversation
Comments and docstrings in the builder, metrics, loader and parameter sources still spoke of OSB and OpenSearch where they mean Solr Orbit and Solr, a comment in the test run orchestrator said it auto-converts a workload when it refuses one, and two commented-out blocks in benchmark.py referred to an argument that no longer exists. No behaviour changes.
These three presets carried their JVM flag only in a jvm.options template that the Solr launcher never reads, so --cluster-config ea or fp changed nothing. They now set solr_opts, the variable the launcher already maps to SOLR_OPTS, and the flags of several such presets add up instead of the last one replacing the others.
create-backup, restore-backup, create-backup-repository, delete-backup-repository and wait-for-backup-create were registered and failed with not yet implemented. No shipped workload uses them and the converter never writes them, because a Solr backup repository is declared in the node's configuration rather than through a request. A workload that needs a backup calls the Backup API with raw-request.
The option that named the plugins to install was removed earlier, so the plugin list was always empty, and the builder itself says Solr does not install plugins through the tool; modules are enabled with --solr-modules. What was left read and stored a --plugin-params that went to no plugin, a metadata function nobody called, and a loader, a lister and a download-URL provider for plugin directories that the cluster configs do not contain. Results no longer carry an always-empty plugin-params key; stored results that have one still load.
The runtime still accepted refresh as a second name for commit, and the templates for new workloads and the converter's output depended on it. The converter now turns an upstream refresh into a commit, in an operation type, in a bare step and in the task named refresh-after-*, so the runtime has one name for the step and a workload written from a Solr cluster says commit-after-index.
…table On a failed request the worker parsed the error body with a table of OpenSearch action names and permission texts. For a Solr error body it matched nothing and printed error occured, check logs for details, hiding the message Solr had sent. The error description is now printed as it came.
A node installed with --cluster-config 4gheap ran with Solr's default heap of 512m, because the launcher built its environment from the passed-through variables only; run already translated the same variables into SOLR_HEAP, GC_TUNE and SOLR_OPTS. install now stores that environment in node-config.json and start applies it, through one function that run and the Docker launcher use as well. The g1gc preset for released versions still carried the old variable names and set nothing, and parallelgc existed only for main; both are now the same in both directories.
The block that prints a failed request's error sat inside execute_single without a test. One test pins that the error a Solr request failed with is printed as it came, and fails on the code that printed a generic text instead; one pins that a redline test prints nothing.
The vanilla cluster config wrote jvm.options and log4j2.properties into a config/ directory of the Solr root, and the ea, fp and debug-non-safepoints presets did the same with one JVM flag each. Solr reads neither file: its JVM is set through bin/solr and its logging through server/resources/log4j2.xml. The flags now travel as solr_opts, so the templates are removed, the presets that only carried a template are plain mixins, and the vanilla README describes the variables that count.
…ly for a refresh A solr_opts given with --cluster-config-params was added to every config in the list, so it was repeated once per mixin and replaced the mixins' own options. The parameters are now applied once, after the configs are merged. The converter renamed refresh-after-* by name alone in the text form, which also renamed a force-merge task, and left an object-form refresh unconverted in both forms; the rename now follows the operation being a refresh, as an object or a bare name.
The opensearch logger configured the Python client of OpenSearch, which Solr Orbit does not depend on, and bootstrap_phase, cluster_config_instance, cluster_config_descriptor and cluster_config_types are copies of classes that cluster_config.py defines itself and that nothing imports.
Search and bulk parameters carried the target as index, and the runtime accepted index as a second name for collection in six places, which is the name of an OpenSearch workload. They now carry and read collection; the converter already renames index. The _all message no longer explains what OpenSearch does, and a helper that mapped OpenSearch client keyword names and had no caller is gone.
The README said the tests were written for OpenSearch Benchmark, would not pass against Solr and needed an OpenSearch cluster, while they install and start Solr nodes. Docker was required by the setup of every module although only the Docker pipeline test and the proxy test use it, so even list and info could not run without it; the check now sits in those two. The default versions named 10.0.0, which downloads.apache.org no longer serves, and are now 9.11.0 and 10.1.0. An unused decorator for a configuration that does not exist is gone, three comments no longer explain what OpenSearch did, and make it asks for the Java 21 that Solr 10 needs instead of 17.
generate-data took the fields of its documents from index mappings in the format of OpenSearch, so the schema that create-workload writes for a Solr collection could not be used and the documentation did not say what format it wanted. --solr-schema reads the Schema API response or that file and generates a value per field by the class of its type: a unique value for the uniqueKey, lists for multi-valued fields except where a copyField into a single-valued field forbids it, points as lat,lon and dates as full instants, the shapes Solr accepts. skip_fields in the config leaves out fields that an update processor fills. 2000 generated documents were indexed into a collection of the geonames configset without an error.
serhiy-bzhezytskyy
marked this pull request as draft
December 3, 2026 11:42
An operation named scroll, date_histogram_* or *_function_score named an OpenSearch feature that Solr offers under another name: paging with a cursor, a range facet over dates, a function query. The converter now renames them with their parameters as it does for agg and index-stats, so a converted workload reads as one written for Solr.
A converted search_after kept its sort but lost the values, so the operation fetched the first page instead of the page after them. The converter now builds the cursorMark that Solr starts a cursor from, appends id to the sort as the tie-break, and carries an explicit track_total_hits as minExactCount.
An operation named with_after names the OpenSearch parameter; Solr starts the page from a cursorMark. The converter renames it with_cursor with its parameters, as it does for scroll and date_histogram.
serhiy-bzhezytskyy
force-pushed
the
search-after-to-cursor-mark
branch
from
December 3, 2026 12:42
76fa3c2 to
891bad7
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A converted
search_afterkept its sort but lost the values, so the operation fetched the first page instead of the page after them. Stacked on #197, whose commits come first in this branch and drop out of the diff when it merges; the table of names is there.Solr starts a cursor at given sort values when the
cursorMarkencodes them: Base64 of the JavaBin list of one value per sort clause (CursorMark#getSerializedTotem). The converter builds that mark from the values, appendsidto the sort in the direction of the last clause, and adds a tie-break value that sorts after (asc) or before (desc) every id, so documents equal to the values are skipped as OpenSearch skips them. An explicittrack_total_hitsis carried asminExactCount:falsebecomes 1, the threshold OpenSearch hands Lucene.Only
plongsort fields with non-negative values are carried, the case compared with OpenSearch; anything else is reported inCONVERTED.md. The operations are named*_with_cursor_*, not*_with_after_*, with their parameters.Test with:
It prints
"sort": "population asc,id asc"and"cursorMark": "AoJwpOgDIX4="; before the change the sort waspopulation ascand there was no mark. For geonames' three operations the converter writes the bodies that apache/solr-orbit-workloads#32 added, and with the renamed shipped files in solr-orbit-workloads#40 the three operations are identical. On a 1,000,436-document sample, three consecutive pages of each gave the same ids in the same order as OpenSearch'ssearch_after: 300, 212 (the whole result) and 300; that run was not repeated for this version.