apple / apple/foundationdb

Golang client API: multi client with one cluster file.

Open
#3,965 2 comments 0 reactions 1 assignee Claimed by @sfc-gh-mpilman View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

it has limit of operation on one database connection. so when i try to create multi database with same cluster file it return error(one cluster file can create one connection)
i have to divide one program to multi process to improve operation rate. operation count is linearly increased by process count. so please help to create multi connection(`Database`) with one cluster file.

```golang
func OpenDatabase(clusterFile string) (Database, error) {
networkMutex.Lock()
defer networkMutex.Unlock()
...

db, ok := openDatabases[clusterFile]
if !ok {
db, e = createDatabase(clusterFile)
if e != nil {
return Database{}, e
}
openDatabases[clusterFile] = db
}

return db, nil
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.