Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change locking policy for Transaction #68

Open
someone1 opened this issue Oct 24, 2019 · 1 comment
Open

Change locking policy for Transaction #68

someone1 opened this issue Oct 24, 2019 · 1 comment

Comments

@someone1
Copy link
Collaborator

This was driving me up a wall, but nds treats transactions differently than the datastore package.

Specifically, it keeps an internal lock which is never unlocked after a commit or rollback. This will keep executing code deadlocked and is different than how the datastore package handles things.

Comments around this specify:

// tx.Unlock() is not called as the tx context should never be called
// again so we rather block than allow people to misuse the context.

Should we reconsider this policy or better document the difference in behavior from the datastore package?

@jongillham
Copy link
Member

Are you talking about v2? If so are you allowed to try committing a transaction again if it fails?
Being able to match the datastore would be ideal.

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

No branches or pull requests

2 participants