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
We probably want to re-evaluate a couple of tests in
sql/builtin_mem_usage_test.goto make them less flaky and to make sure that they test what they intend to.Currently,
TestAggregatesMonitorMemorydoesn'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.TestEvaluatedMemoryIsCheckedseems 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,lowMemoryBudgetvalue 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