ZStorm code should warn or error out on attempts to register a store with the transaction manager in the wrong thread

Bug #348815 reported by James Henstridge
2
Affects Status Importance Assigned to Milestone
Storm
Fix Released
High
James Henstridge

Bug Description

Today I was helping debug a problem in a multi-threaded app that uses the zstorm code to manage per-thread stores.

There was a bug in the code where a Storm object was passed from thread A to thread B to another. When the object was used, the associated store was registered with the transaction manager in thread B. The transaction in thread B was not committed.

When the program attempted to run the next transaction in thread A, it'd start using the same store which was already in an open transaction. Furthermore, because the store had been registered with thread B's transaction, committing in thread A doesn't commit the store.

If register_store_with_transaction() raised an error if the store passed in did not belong to the current thread, then the bug would have been immediately obvious and taken much less time to debug.

This seems like an API misuse that is worthwhile trying to detect.

Related branches

Changed in storm:
assignee: nobody → James Henstridge (jamesh)
importance: Undecided → High
milestone: none → 0.17
status: New → In Progress
Revision history for this message
James Henstridge (jamesh) wrote :

Fix merged in r359.

Changed in storm:
status: In Progress → Fix Committed
Jamu Kakar (jkakar)
Changed in storm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.