poundifdef / smoothmq

An improved drop-in replacement for SQS
https://www.smoothmq.com
GNU Affero General Public License v3.0
2.04k stars 35 forks source link

Add missing transaction rollback in certain failure scenarios #7

Closed Chasesc closed 2 months ago

Chasesc commented 2 months ago

In DeleteQueue, we only rollback after the first select fails (which shouldn't be needed) and we are missing rollbacks after failures post DELETE statements.

I am adding a defer to rollback which should be a no-op if the commit went through. This is already done in Enqueue.

poundifdef commented 2 months ago

Awesome - making a note to look through and make sure we're doing this safely everywhere.