Skip to content
Snippets Groups Projects
Commit 6f0df283 authored by Peter J. Keleher's avatar Peter J. Keleher
Browse files

auto

parent 81e611c3
No related branches found
No related tags found
No related merge requests found
......@@ -67,12 +67,10 @@ gRPCs.
The first part is taking your simple blob store and splitting it to a distinct
blob *store* in `p2/ubi/server.go` and command-line tools `p2/blob.go` and `p2/lock.go`.
The second part is building a lock server that will take an *acquire* request for a file
path and acquire read (SHARED) locks on the entire path from the root down to the path's
tail, except that the very last might be a write (EXCLUSIVE) lock, depending on the mode
requested by the gRPC. For example, an incoming acquire (EXCLUSIVE) request for `/foo/bar.go` would
result in a shared lock of `/`, a shared lock on `/foo`, and then an exclusive lock on
`/foo/bar.go`.
The second part is building a lock server that will allow shared and
exclusive locking of any random string. You do not have to do locking
of prefixes of the path.
Each of these locks should be implemented with `sync.RWMutex`, and acquire requests for
paths already locked with incompatible modes would result in the gRPC request being blocked
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment