yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
9.02k stars 1.08k forks source link

[YSQL] Add auto analyze stress unit testing #25049

Open yifanguan opened 10 hours ago

yifanguan commented 10 hours ago

Jira Link: DB-14180

Description

TriggerAnalyzeTableRenameAndDelete, TriggerAnalyzeDatabaseRenameAndDelete, DeletedTableMutationsCount, and DeletedTableMutationsCount2 have some overlaps.

We can have a more robust stress unit test simulating all of these tests.

We create 2 dbs: db1, and db2. Both DBs have one permanent_table and one temporary_table. We have threads that keep doing the following: One thread keeps renaming db1.table1 followed by deleting and recreating db1.table2 followed by renaming db1. One thread keeps renaming db2.table1 followed by deleting and recreating db2.table2 followed by deleting db2 and recreating the whole db. The main thread can assert different conditions and assert the final result when threads end.

Issue Type

kind/new-feature

Warning: Please confirm that this issue does not contain any sensitive information