提交 bbcc824f 作者: Brian Tiger Chow

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

上级 bbcf4e23
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
s3 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/crowdmob/goamz/s3" s3 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/crowdmob/goamz/s3"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/fzzy/radix/redis" "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/fzzy/radix/redis"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore" "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
syncds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
core "github.com/jbenet/go-ipfs/core" core "github.com/jbenet/go-ipfs/core"
corerouting "github.com/jbenet/go-ipfs/core/corerouting" corerouting "github.com/jbenet/go-ipfs/core/corerouting"
config "github.com/jbenet/go-ipfs/repo/config" config "github.com/jbenet/go-ipfs/repo/config"
...@@ -145,7 +144,7 @@ func makeS3Datastore() (*s3datastore.S3Datastore, error) { ...@@ -145,7 +144,7 @@ func makeS3Datastore() (*s3datastore.S3Datastore, error) {
}, nil }, nil
} }
func enhanceDatastore(d datastore.Datastore) (datastore.ThreadSafeDatastore, error) { func enhanceDatastore(d datastore.ThreadSafeDatastore) (datastore.ThreadSafeDatastore, error) {
// TODO cache // TODO cache
return ds2.CloserWrap(syncds.MutexWrap(d)), nil return ds2.CloserWrap(d), nil
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论