Go client how to use multi network threads?

_ = fdb.NetworkOptions{}.SetExternalClientLibrary('/usr/lib64/libfdb_c.so')
_ = fdb.NetworkOptions{}.SetClientThreadsPerVersion(10)

for i :=0 ; i < client; i ++ {
	go fdbBenchmark(db)
func getFdbConnection() fdb.Database{
        db := fdb.MustOpenDatabase('/etc/foundationdb.conf')
        return db
func fdbBenchmark() {
        db := getFdbConnection()

QUESTIONS: I can’t create multi threads per process…every memory address of the db object is the same .go client how to create multi threads per process ?

It looks like the the go bindings internally maintain a cache from cluster_file → db object. I don’t see a way around this using the public api for the current go bindings. One ugly workaround would be to have unique file path for each separate db object.

I created an issue to track this: Multi-threaded client is unusable with go bindings · Issue #6498 · apple/foundationdb · GitHub