foundationdb

FoundationDb: What is meaning of FDBException: Transaction is too old to perform reads or be committed


I am trying to execute a getRange command in fdbCli but it fails with FDBException: Transaction is too old to perform reads or be committed What is the meaning of this particular exception? Does it mean by query took more than 5 sec to complete?


Solution

  • Fdb keeps a list of the transaction started within 5 sec. Also, data nodes only keep versions of the last 5sec. So if the read version is smaller than the last version kept by dataNodes, the dataNodes have no way to answer the request. That's why fdb throws this exception. the trick to evade from such exceptions is to split one huge time taking transaction to many small transactions. I also noticed fdb performs really well if the transaction time < 300ms.