cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.88k stars 3.77k forks source link

sql: transaction cleanup likely malfunctioning (but at the very least, logging too noisily) #5294

Closed tbg closed 8 years ago

tbg commented 8 years ago

See a lot of these errors under light contention at standard logging settings:

E160316 14:28:28.966912 client/txn.go:346  failure aborting transaction: client/txn.go:517: attempting to use ABORTED transaction; abort caused by: retry txn "sql/executor.go:603 sql implicit: false" id=f6515740 key=/Table/53/2/""/Wed Mar 16 14:28:28 UTC 2016/0 rw=true pri=0.05245255 iso=SERIALIZABLE stat=PENDING epo=1 ts=1458138508.959448675,2 orig=1458138508.959448675,2 max=1458138509.188955551,12

This is likely the cleanup of the txn in the Executor (which sends EndTransaction{Commit:false} on a txn restart since we don't support them yet). The code around this in flux anyway (@andreimatei), but when that flux has settled, those messages should be gone.

The message also indicates that maybe we're setting the proto to ABORTED too early (before dispatching for cleanup), so that the cleanup actually never happens (as it gets caught by the client). I don't think we have a test that this cleanup does the right thing - again, something to improve upon when the dust has settled.

andreimatei commented 8 years ago

@tschottdorf do you think the dust has settled here? Anything to do?

tbg commented 8 years ago

Just ran bank against single-node, didn't see any, so I think this has been taken care of copacetically.