Convert OpenSearch's index-stats merge wait to Solr's wait-for-merges - #80
Open
serhiy-bzhezytskyy wants to merge 1 commit into
Open
serhiy-bzhezytskyy wants to merge 1 commit into
serhiy-bzhezytskyy wants to merge 1 commit into
Conversation
OpenSearch Benchmark has no operation type for waiting on merges: workloads
poll the index-stats API until "_all.total.merges.current" reaches zero. The
converter left that operation as "operation-type": "index-stats", which no
Solr Orbit runner is registered for, so the converted workload aborted:
Task: wait-until-merges-finish
Error: No runner available for operation type [index-stats]
The task is scheduled after force-merge, so a converted nyc_taxis run failed
only once the indexing and merging were already done.
Solr Orbit has a wait-for-merges operation type whose runner polls node
metrics, so the whole idiom converts to it: the polling that OpenSearch
expresses with "condition" and "retry-until-success" is the runner's own loop,
parameterised by retry-wait-period and max-wait-seconds.
The condition path is what identifies the idiom, so an index-stats operation
that measures the stats API itself (geonames schedules one) is left alone.
Fragments whose Jinja2 directives keep them from parsing as JSON are copied
verbatim, and both nyc_taxis references live in such a fragment, so the same
conversion is applied to their text.
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.
Description
OpenSearch Benchmark has no operation type for waiting on merges — workloads poll
index-statsuntil_all.total.merges.currentreaches zero. The converter passed that through as"operation-type": "index-stats", which no runner is registered for, so the converted workload aborted withNo runner available for operation type [index-stats].Solr Orbit already has the operation:
wait-for-merges, registered in the initial port (57387ed4), and the hand-written Solrnyc_taxisalready uses it. Its runner does the polling itself, so the whole idiom converts to it, and thecondition/retry-until-successkeys become the runner'sretry-wait-periodandmax-wait-seconds. Nothing new is introduced here — the converter just stops emitting an operation type that has no runner.The condition path is what identifies the idiom, so an
index-statsoperation whose condition polls something else is left alone. No upstream workload has one, so that guard is defensive; a test pins it.Both
nyc_taxisreferences live in fragments whose Jinja2 directives keep them from parsing as JSON, which the converter copies verbatim, so the same conversion is applied to their text.90 lines of code, 164 of tests, 1 of docs.
Issues Resolved
Fixes #79
Testing
Before / after, same converted workload, one task. Upstream
nyc_taxisconverted onmainat f088380 and on this branch, then:No runner available for operation type [index-stats]Using user-provided operation type [wait-for-merges] for operation [wait-until-merges-finish]The task is
include-in-reporting: false, so ✅ SUCCESS on its own proves nothing about it. Reading~/.solr-orbit/logs/benchmark.log, the schedule is built ([0] warmup iterations and [1] iterations) and on a copy with reporting turned on the task reports 73.207 ms service time at a 0% error rate.The generated operation now matches the hand-written Solr
nyc_taxisinsolr-orbit-workloadsbyte for byte, key order included:{ "name": "wait-until-merges-finish", "operation-type": "wait-for-merges", "retry-wait-period": 2.0, "max-wait-seconds": 600, "include-in-reporting": false }Reach and false positives. Converting every upstream workload that contains the idiom (
clickbench,geonames,geoshape,http_logs,neural_search,noaa_semantic_search,nyc_taxis,pmc,treccovid_semantic_search) and counting"index-stats"in the output:All 16 that changed are operation definitions, and every one is this idiom. The remaining match is not a definition — it is a schedule reference,
"operation": "index-stats", to OpenSearch Benchmark's built-in operation of that name, whichgeonamesnever defines. This change does not address that, andgeonames/test_procedures/default.jsoncomes out byte-identical to whatmainproduces.Diffing the two trees whole: apart from the conversion timestamp in
CONVERTED.md, exactly 13 files differ, 16 hunks in total, and every hunk is this rewrite and nothing else.Indentation. The text path re-serialises the object, so the step is inferred from the matched object rather than fixed:
geoshape's fragments are 2-space andnyc_taxis's are 4-space, and a test covers each. Without that, the rewritten keys landed 14 spaces deep insidegeoshape.pytest tests/→ 1118 passed, 5 skipped.ruffclean.Not covered. Two source occurrences are in nested directories under
test_procedures/, which the converter does not walk, so those files never reach the output at all. Andgeonames' bare"operation": "index-stats"reference is untouched. Both are separate defects; I will report them separately.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.