@cryptotaxi247 / kubo / commits / bbcc824f8

feat(routingd) lose the mutex. the S3 datastore is threadsafe

Brian Tiger Chow committed Feb 15, 2015 at 04:45 UTC bbcc824f8e7c8c1014e57e16ed80c07a2f8b8a75
1 file changed +2 -3
cmd/ipfs_routingd/main.go
+2 -3
@@ -14,7 +14,6 @@ import (
14 s3 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/crowdmob/goamz/s3"
15 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/fzzy/radix/redis"
16 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
17 - syncds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
17 core "github.com/jbenet/go-ipfs/core"
18 corerouting "github.com/jbenet/go-ipfs/core/corerouting"
19 config "github.com/jbenet/go-ipfs/repo/config"
@@ -145,7 +144,7 @@ func makeS3Datastore() (*s3datastore.S3Datastore, error) {
144 }, nil
145 }
146
148 -func enhanceDatastore(d datastore.Datastore) (datastore.ThreadSafeDatastore, error) {
147 +func enhanceDatastore(d datastore.ThreadSafeDatastore) (datastore.ThreadSafeDatastore, error) {
148 // TODO cache
150 - return ds2.CloserWrap(syncds.MutexWrap(d)), nil
149 + return ds2.CloserWrap(d), nil
150 }