Speculative: Run transaction rollback asynchronously #59
Labels
area/datastore
Affects the storage system
priority/4 maybe
This might get done someday
state/needs discussion
This can't be worked on yet
Right now, the transaction used in the CRDB driver to set the query to use the proper time is rolled back synchronously via a
defer tx.Rollback(ctx)
call in the query code: https://github.com/authzed/spicedb/blob/main/internal/datastore/common/sql.go#L248During performance testing it was noticed that this rollback can take anywhere from 0.5ms to 3ms, so it might be possible to get a small win if we can run the rollback asynchronously while the queried data is returned to the caller. This may not be possible given the connection pool in use; we'd need to investigate if this would cause any secondary effects.
The text was updated successfully, but these errors were encountered: