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

Concurrency properties are unclear #16

Open
extemporalgenome opened this issue Nov 5, 2013 · 3 comments
Open

Concurrency properties are unclear #16

extemporalgenome opened this issue Nov 5, 2013 · 3 comments
Assignees

Comments

@extemporalgenome
Copy link

It's unclear if some operations need synchronization. For example, it's clear that the Enumerator implementation tracks modifications between enumeration steps, but it's unclear whether those modifications can happen concurrently with enumeration steps.

The requirement of operations performed in isolation to maintain the appearance of atomicity is likewise vague: what precisely do you mean by isolation (must we make sure our transactions hold a mutex or are equivalently and exclusively synchronized in order for them to be atomic)?

It may be cleaner to describe the circumstances in which kv isn't concurrent safe (or has different semantics when ops are done concurrently) rather than describing the situations in which concurrent access is safe/predictable.

@ghost ghost assigned cznic Nov 5, 2013
@cznic
Copy link
Owner

cznic commented Nov 5, 2013

The documentation can be more explicit about this.

#Accepted

@wanton7
Copy link

wanton7 commented May 11, 2014

Document is pretty unclear about that atleast in BeginTranscation. It also doesn't any test and documentation reads it's safe to use in concurrent environment.
After looking at the code I can't see how it's possible for multiple goroutines in example a web service to work without using mutex locking before BeginTransaction and unlocking after commit or rollback.
Or am I missing something here?

@siddontang
Copy link

I have the same doubt, I see the source that there is no way to guarantee different transaction serializable writing. Maybe user must use a lock outer?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

4 participants