Closed mrusme closed 2 years ago
This is the code that I'm using:
log.Println("Opening OrbitDB as reader ...") orbitdb1, err = orbitdb.NewOrbitDB(ctx, ipfs, &orbitdb.NewOrbitDBOptions{ Directory: &orbitDir, }) if err != nil { log.Println(err) return } log.Println("NewOrbitDB succeeded") create := true storetype := "docstore" dbstore, err := orbitdb1.Open(ctx, testid, &orbitdb.CreateDBOptions{Create: &create, StoreType: &storetype}) if err != nil { log.Println(err) return } db1 = dbstore.(orbitdb.DocumentStore)
I'm trying to open an OrbitDB that a different node created. testid contains a valid /orbitdb/<hash>/<dbname> URI. When I run this code, it seems to be stuck at .Open(...) and won't return.
testid
/orbitdb/<hash>/<dbname>
.Open(...)
I just added a zap logger and now it works. Very strange.
This might be race-condition, if you could try to reproduce with go test -race to get a stack dump, we could try to tackle the core issue
go test -race
This is the code that I'm using:
I'm trying to open an OrbitDB that a different node created.
testid
contains a valid/orbitdb/<hash>/<dbname>
URI. When I run this code, it seems to be stuck at.Open(...)
and won't return.