cockroachdb / cockroach

CockroachDB - the open source, cloud-native distributed SQL database.
https://www.cockroachlabs.com
Other
29.56k stars 3.7k forks source link

roachtest: create operation for a storage manual compaction #126480

Closed itsbilal closed 1 week ago

itsbilal commented 2 weeks ago

We should add a roachtest operation that runs this SQL statement:

SELECT crdb_internal.compact_engine_span(
            random_node_id, random_store_id_from_that_node,
            (SELECT raw_start_key FROM [SHOW RANGES FROM TABLE random_table WITH KEYS] LIMIT 1),
            (SELECT raw_end_key FROM [SHOW RANGES FROM TABLE random_table WITH KEYS] LIMIT 1))`;

This will trigger an online manual compaction in Pebble, that should compact this range all the way down to L6. Having a manual compaction ongoing would induce a moderate amount of chaos, and could possibly lead to interesting behaviour in Storage as well as elsewhere in CockroachDB.

Jira issue: CRDB-39942

blathers-crl[bot] commented 2 weeks ago

cc @cockroachdb/test-eng

itsbilal commented 2 weeks ago

Added this to T-testeng, but I expect this to be owned by the DRP team.