You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating this issue to have a place to discuss possible ways to speedup backupccl tests.
Currently each backup test spins up and tears down a test cluster. This means that for a lot of tests we spend most of the time doing repeated work. I think we can speed up running make test PKG=./pkg/ccl/backupccl but doing something smarter here. Essentially we want to only have 1 test cluster instance that can be shared among all the tests. Most tests use backupRestoreTestSetup, so I think that it can be leveraged to manage a singleton instance of the cluster. The main work that needs to be done is ensuring that the data for each test doesn't conflict with eachother. After poking around at this, I think it can be done in 1 of 2 ways:
Namespace the databases created by each tests to be prefixed with the testname. This ensures that there are no conflicts, but things may get a bit messy with nested tests which refer to databases that are created at a higher level test.
Introduce a new guarantee that every test has to clean up after itself and drop any databases that it created. We can leverage the cleanup func provided by backupRestoreTestSetup to make this easier. This means that on most CREATE DATABASE request, we should expect to see a DROP DATABASE deferred.
Soliciting any additional thoughts/approaches we could use here.
We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
10 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB!
I'm creating this issue to have a place to discuss possible ways to speedup backupccl tests.
Currently each backup test spins up and tears down a test cluster. This means that for a lot of tests we spend most of the time doing repeated work. I think we can speed up running
make test PKG=./pkg/ccl/backupccl
but doing something smarter here. Essentially we want to only have 1 test cluster instance that can be shared among all the tests. Most tests usebackupRestoreTestSetup
, so I think that it can be leveraged to manage a singleton instance of the cluster. The main work that needs to be done is ensuring that the data for each test doesn't conflict with eachother. After poking around at this, I think it can be done in 1 of 2 ways:Namespace the databases created by each tests to be prefixed with the testname. This ensures that there are no conflicts, but things may get a bit messy with nested tests which refer to databases that are created at a higher level test.
Introduce a new guarantee that every test has to clean up after itself and drop any databases that it created. We can leverage the cleanup func provided by backupRestoreTestSetup to make this easier. This means that on most CREATE DATABASE request, we should expect to see a DROP DATABASE deferred.
Soliciting any additional thoughts/approaches we could use here.
cc @dt
Epic CRDB-7779
Jira issue: CRDB-5103
The text was updated successfully, but these errors were encountered: