chrishinds / committed

nodejs package providing a framework for failure-resistant transaction and audit support atop mongodb-native and async.queue
GNU General Public License v3.0
7 stars 1 forks source link

Cannot Committed.immediately with queue regexes set up. #3

Closed simon-bond closed 9 years ago

simon-bond commented 9 years ago

A transaction which is committed for execution immediately must have null queue name. Immediately transactions are checked by _checkTransaction which includes a test against the queue regex. No sensible regex is going to match against null (not even sure it's possible) so this will always fail for immediately transactions.

Normal transactions have the existence of their queue name checked in _enqueue so suggest that _checkTransaction ignores null queue names. Also worth bearing in mind that "GlobalLock" needs to be matched by the RegEx on systems that uses global lock transactions.