Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: fix bottlenecks when purging system.web_sessions
The previous purging limit was found to be too low which resulted in the `system.web_sessions` table growing rapidly. Additionally, we were using `ORDER BY random()` when deleting expired sessions from the table which caused a full table scan of a large table. This resulted in high cpu usage on every purge attempt with only very few rows actually being deleted. Over time, this turns into a nonideal feedback loop. This change fixes the two issues by: 1. Increasing the defauilt purging limit to 1000 from 10. 2. Remove the `ORDER BY random()` when purging the table to avoid full table scans on every purge. support ticket: cockroachlabs/support#1812 resolves cockroachdb#88622 Release note: None
- Loading branch information