-
Notifications
You must be signed in to change notification settings - Fork 4
nyc_taxis: make the fixed-interval histogram 60 days wide, on the epoch grid - #21
Open
serhiy-bzhezytskyy wants to merge 1 commit into
Open
nyc_taxis: make the fixed-interval histogram 60 days wide, on the epoch grid #21serhiy-bzhezytskyy wants to merge 1 commit into
serhiy-bzhezytskyy wants to merge 1 commit into
Conversation
...ch grid OpenSearch Benchmark's date_histogram_fixed_interval asks for "fixed_interval": "60d", and OpenSearch anchors a fixed interval on the epoch, not on the query's lower bound. The port asked Solr for "+30DAY" starting at the query's own 2015年01月01日, so it produced buckets of half the width on different edges. Both artifacts, both engines, same 300,649 documents. The Solr operation body is sent to Solr 10.0.0 and the OpenSearch Benchmark operation body to OpenSearch 3.8.0, so the comparison is between the two shipped files rather than a reconstruction: shipped start=2015年01月01日 gap=+30DAY 13 buckets width start=2015年01月01日 gap=+60DAY 7 buckets this fix start=2014年11月06日 gap=+60DAY 8 buckets, identical to OpenSearch Solr OpenSearch 2014年11月06日T00:00:00 2996 | 2014年11月06日 00:00:00 2996 2015年01月05日T00:00:00 52666 | 2015年01月05日 00:00:00 52666 2015年03月06日T00:00:00 54062 | 2015年03月06日 00:00:00 54062 2015年05月05日T00:00:00 51300 | 2015年05月05日 00:00:00 51300 2015年07月04日T00:00:00 45290 | 2015年07月04日 00:00:00 45290 2015年09月02日T00:00:00 47561 | 2015年09月02日 00:00:00 47561 2015年11月01日T00:00:00 46009 | 2015年11月01日 00:00:00 46009 2015年12月31日T00:00:00 756 | 2015年12月31日 00:00:00 756 Solr numFound and both bucket sums are 300,640, so no matched document falls outside a bucket on either side. 2014年11月06日 is the last 60-day boundary from 1970年01月01日 that is not after the corpus; the buckets before the data are empty and mincount 1 drops them. The two sibling operations were checked the same way and needed no change: date_histogram_calendar_interval agrees on 12 buckets and date_histogram_facet on 21, counts identical. The README said "upstream" without saying upstream of what, and here it matters: Elastic's rally-tracks carries a workload of the same name that has diverged (fixed_interval 10d, calendar_interval week), so it names the reference once for the whole table. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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's
nyc_taxis— the workload this one was ported from — definesdate_histogram_fixed_intervalwith"fixed_interval": "60d", and OpenSearch anchors a fixed interval on the epoch rather than on the query. This port asks Solr for"+30DAY", starting at the query's own lower bound:So the operation reports buckets of half the width, on different edges. Nothing fails and no document is lost — the sum over buckets is right — but the shape of the histogram, which is what this operation exists to measure, is not the shape OpenSearch Benchmark measures.
Two separate corrections are needed, and the first alone is not enough:
2014年11月06日T00:00:00Zis the last 60-day boundary from1970年01月01日that is not after the corpus. Solr counts gaps fromstart, so that is where the bucket edges have to begin for them to fall on the instants OpenSearch uses. The buckets before the data are empty andmincount: 1drops them, so the response still starts at the first bucket that holds documents —2014年11月06日, which is where the OpenSearch Benchmark run's first bucket also starts.Which reference
The
nyc_taxisnotes innyc_taxis/README.mdsay "upstream" four times without saying upstream of what, and here it matters: Elastic'srally-trackscarries a workload of the same name whose values have diverged from OpenSearch Benchmark's.Checked against
rally-tracks, this change would look wrong. The port follows OpenSearch Benchmark throughout — the shippeddate_histogram_calendar_intervalis+1MONTH, which is OSB'smonthand not rally'sweek— so this adds one sentence to the README naming that repository as the reference, once for the whole table.Measured
Both shipped files, both engines, the same 300,649 documents: the operation body from this repository is sent to Solr 10.0.0, the OpenSearch Benchmark operation body to OpenSearch 3.8.0. Nothing is reconstructed by the harness — it reads the two
operations/default.jsonfiles and posts what it finds.8 buckets against 8, identical edges and identical counts. Both bucket sums are 300,640, which is Solr's
numFound, so no matched document falls outside a bucket on either side. OpenSearch reportshits.total.value: 10000here because of its defaulttrack_total_hitscap — the comparison is between the bucket sums, not that number.The two sibling operations were checked the same way and need no change:
date_histogram_calendar_intervalagrees on 12 buckets anddate_histogram_faceton 21, counts identical. A calendar month and a day are already aligned bystart: 2015年01月01日, so only the fixed interval was off.What this does not show
The counts above are a 300,649-document sample, not the full corpus. The bucket edges do not depend on how much of the corpus is loaded, and neither does the agreement between the two engines, but the numbers inside the buckets obviously do.
Related
None to close. This is the
date_histogram_fixed_intervaldifference I recorded in #18 as wanting its own PR with its own measurement.apache/solr-orbit#77 makes the converter emit
+60DAYfor afixed_interval: 60dinstead of silently defaulting to+1MONTH, so the value corrected here is one the converter can now produce rather than one only present by hand. Neither PR needs the other, and the remaining difference between the generated operation and this file — the facet window, stillNOW/YEAR-10YEAR— is being handled separately over there.