Skip to content
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.

fix thread locking for nested transaction #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bmatsuo
Copy link
Contributor

@bmatsuo bmatsuo commented Aug 13, 2014

Nested transaction need to know that they are nested so they don't call runtime.UnlockOSThread while their parent is pending.

There's a pretty big warning about thread safety on the godoc for BeginTxn. Maybe at some point the "BUG:" part is removed and this is just a feature of the Txn type. IDK. For now I think it should be considered a bug.

Note: I made the Cursor type aware that it was created from a nested transaction so that its Txn method can work properly (the transaction will not unlock the goroutine on Commit/Abort).

@bmatsuo
Copy link
Contributor Author

bmatsuo commented Aug 18, 2014

@szferi ping. can you take a look at this?

@szferi
Copy link
Owner

szferi commented Aug 19, 2014

Sorry I'm busy I will try to find some time to review it in this week.

@bmatsuo
Copy link
Contributor Author

bmatsuo commented Aug 19, 2014

Ok 😄 Just wanted to make sure you saw it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants