resetchain is a tool that clears CockroachDB data for a specific chain.
It follows CockroachDB best practices for deleting data: https://www.cockroachlabs.com/docs/stable/bulk-delete-data.html. It can be summarised as: do deletes in chunks, use a "cursor" or some discriminator to select a chunk that certainly doesn't contain rows from the chunk you previously deleted (in our case, id column).
I changed resetter_test.go to use a single cockroachdb instance across all tests, this should speed them up a lot. On my pc, the testserver takes almost 10s to start.
resetchain
is a tool that clears CockroachDB data for a specific chain.It follows CockroachDB best practices for deleting data: https://www.cockroachlabs.com/docs/stable/bulk-delete-data.html. It can be summarised as: do deletes in chunks, use a "cursor" or some discriminator to select a chunk that certainly doesn't contain rows from the chunk you previously deleted (in our case,
id
column).Closes https://github.com/EmerisHQ/demeris-backend/issues/564