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?

- 492
- 7
- 15
-
What programming language are you using? Can you paste the exact step you have done to produce the error? Thanks! – amirouche Jan 13 '20 at 18:24
-
I am using java. I am using getRange() method to get range – Nischal Kumar Jan 14 '20 at 17:19
-
Sorry, I did not read carrefully the first time. I am not familiar with fdbcli. I use Python instead. – amirouche Jan 14 '20 at 21:13
-
It seems to me the exception says it all. But you did not paste the exact steps you have done to produce the error so it will be difficult to debug the problem from here. – amirouche Jan 14 '20 at 21:14
2 Answers
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.

- 492
- 7
- 15
Firstly - yes, you are correct (your query took more than 5 seconds to complete).
If the read request’s timestamp is older than 5 seconds, the storage server may have already flushed the data from its in-memory multi-version data structure to its on-disk single-version data structure. This means the storage server does not have the data older than the 5 seconds. So the client will receive the error you've mentioned.
NB: You can avoid this problem via the use of a RecordCursor and by using passing a continuation to your query.
More on continuations here.

- 1,748
- 20
- 20