Getting "Future Not Completed" message while trying to insert a record in database using Jupyter Notebook

Hi All,
I have 3 node foundationDb cluster set and trying to write some data using Jupyter notebook but no success. Here is simple scala client code:

import com.apple.foundationdb.{FDB, Database, ReadTransaction, Transaction}
import com.apple.foundationdb.tuple.Tuple
val fdb: FDB = FDB.selectAPIVersion(620)
val db : Database = fdb.open("/tmp/fdb.cluster")
val tr:Transaction  = db.createTransaction()
tr.set(Tuple.from("hello").pack(), Tuple.from("world").pack());
tr.commit()

When I run the above code, no error is raised however no records are inserted in database. I get “Future Not Completed” message
tr: com.apple.foundationdb.Transaction = com.apple.foundationdb.FDBTransaction@715fd4fc
res1: java.util.concurrent.CompletableFuture[Void] = com.apple.foundationdb.FutureVoid@222e4a79[Not completed]

Any pointer on what am I missing?

I can telnet to 10.23.120.12 4500 from notebook where coordinator is running and my “fdb.cluster” file includes following entry;
3lNzewdi:kddXnnoj@10.23.120.12:4500

Thanks in advance.

I think commit() returns a future that you need to .wait() on.

1 Like