2 ms·
I'm not sure if many databases offer this, but you can do it in foundationdb like this: version = txn.get_read_version().wait() compute_something(version
by josephg 3y ago
I'm not sure if many databases offer this, but you can do it in foundationdb like this:
version = txn.get_read_version().wait()
compute_something(version)
Then on the remote computer, you can create a new transaction and call:
def compute_something(version):
txn2 = db.create_transaction()
txn2.set_read_version(version)
# ... Then use the transaction as normal.
This will ensure both transactions are looking at the same snapshot of the data in the database.
Docs: https://apple.github.io/foundationdb/api-python.html#versions https://apple.github.io/foundationdb/api-python.html#version...