Skip to content

sql: make tests in builtin_mem_usage_test.go less flaky #79014

@yuzefovich

Description

@yuzefovich

We probably want to re-evaluate a couple of tests in sql/builtin_mem_usage_test.go to make them less flaky and to make sure that they test what they intend to.

Currently, TestAggregatesMonitorMemory doesn't seem like a very useful test to me anymore because we now do memory accounting when scanning the table "with long strings", so it's likely that OOM error occurs not during the aggregation. This probably needs to be rewritten or removed.

TestEvaluatedMemoryIsChecked seems still useful since there the only memory consumer is the builtin, so we do want to make sure that builtins that might use a lot of memory do proper memory accounting. However, lowMemoryBudget value is needed to be bumped periodically due to the internal queries using more and more memory (or memory accounting being more precise).

Jira issue: CRDB-14499

Metadata

Metadata

Assignees

Labels

C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.E-quick-winLikely to be a quick win for someone experienced.T-sql-queriesSQL Queries Team

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions