-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Critical - P2
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
7
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Problem
PERF-9520 deleted the mongo-perf variants, which held the only collation performance tests in sys-perf:
- insert_read_commands: Insert.IndexedStringsSimpleCollation, Insert.IndexedStringsNonSimpleCollation
- query_read_commands: Queries.StringUnindexedInPredWith(Non)SimpleCollation and the Large variants
- agg-query-comparison_read_commands: the Aggregation.StringUnindexed...Collation counterparts
None of the Locust replacement tickets linked from PERF-9520 covers them. On DSI master the only remaining collation use is the index on foreignLookupFieldDILJ in workloads/query-execution/lookup for insertion, but never be used in measured query.
While testing SERVER-132620, I found that neither QHVW nor HVW exercises collation.
Why it matters
A non-simple collation sends every string comparison through ICU, so extra comparison work shows up much larger in collation tests. They caught:
- BF-31625: 38% regression in Aggregation.StringUnindexedLargeInPredWithNonSimpleCollation from
SERVER-84274, fixed bySERVER-85775. - BF-9690: 50% drop on the large $in microbenchmarks, collation variants included, fixed by
SERVER-35851.
Collation also runs on the vendored ICU 57.1, which has a known correctness bug in sort key generation (SERVER-132620).
Proposal
Create a collation performance test in Locust and add it to the Query HVW context. It should cover:
- $in with a non-simple collation, small and large lists
- inserts into an index with a non-simple collation
- sort under a non-simple collation
- one case with strings longer than 250 bytes, which take the heap-buffer path in getComparisonKey after the SERVER-132620 fix; no previous test covered it
The ICU key function itself is covered separately by collator_interface_icu_bm in benchmarks_query (added in SERVER-132620).
- is related to
-
SERVER-84274 Make InListData sort and dedup its elements up-front
-
- Closed
-
-
SERVER-85775 Make InListData sort and dedup lazily
-
- Closed
-
-
SERVER-35851 Consider checking whether the array passed to $in is already sorted before calling std::sort
-
- Closed
-