Testing indices query cache memory stats#135298
Conversation
|
Pinging @elastic/es-data-management (Team:Data Management) |
I think it's all based on the number of segments, not the number of documents. |
OK I looked more closely, and you're right. I rewrote the unit test and was able to see that (generally) memory is attributed proportionally to the number of cached queries per segment. |
…asseyke/elasticsearch into testing-IndicesQueryCache-memory-stats
|
This might give us a little trouble if/when we turn on |
I don't think that what we compute will change -- it's pretty much all hard-coded values, not actual memory measurements. What we compute might get more wrong when we turn on |
* upstream/main: (22 commits) Fix InternalCategorizationAggregationTests.testReduceRandom (elastic#135533) [DOCS] GeoIP processor: add clarification about using a reverse proxy endpoint (elastic#135534) Move `ProjectRoutingInfo` and related classes (elastic#135586) Refactor IndexAbstractionResolver (elastic#135587) Simplify returnLocalAll handling in ES|QL (elastic#135353) Reapply "Add an option to return early from an allocate call" (elastic#135589) Mute org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT test elastic#134407 Mute org.elasticsearch.xpack.esql.heap_attack.HeapAttackIT testAggTooManyMvLongs elastic#135585 Mute org.elasticsearch.multiproject.test.XpackWithMultipleProjectsClientYamlTestSuiteIT test {yaml=esql/60_usage/Basic ESQL usage output (telemetry) snapshot version} elastic#135579 Mute org.elasticsearch.search.ccs.KnnVectorQueryBuilderCrossClusterSearchIT testKnnQueryWithCcsMinimizeRoundTripsFalse elastic#135573 Mute org.elasticsearch.xpack.esql.inference.textembedding.TextEmbeddingOperatorTests testSimpleCircuitBreaking elastic#135569 Add telemetry for `TS` command (elastic#135471) Mute org.elasticsearch.cluster.routing.allocation.decider.RestoreInProgressAllocationDeciderTests testCanAllocatePrimaryExistingInRestoreInProgress elastic#135566 allocation: clarify RestoreInProgressAllocationDecider failure message (elastic#132307) [ES|QL] Register AggregateMetricDoubleLiteral (elastic#135054) Validate Logstash pipeline ID when creating. (elastic#135378) Migrate transport versions 8841050 through 8841041 (elastic#135555) Mute org.elasticsearch.search.ccs.SparseVectorQueryBuilderCrossClusterSearchIT testSparseVectorQueryWithCcsMinimizeRoundTripsFalse elastic#135559 Mute org.elasticsearch.action.admin.cluster.stats.SearchUsageStatsTests testToXContent elastic#135558 Testing indices query cache memory stats (elastic#135298) ...
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit 1e1bf28)
(cherry picked from commit 1e1bf28)
|
I'm backporting these changes to 8.19 and 9.1 so that I can cleanly backport #130857. |
This adds a test to show how we expect the IndicesQueryCache to attribute memory to different shards. We attribute memory to a shard proportionally to how many documents in that shard are in the cache. This does not change behavior at all, but does change some variable names and comments for clarity.