Better handle API version in mako.c

Only use fdb_future_get_int64 for API version >= 620.
This commit is contained in:
Jingyu Zhou 2019-07-18 13:47:43 -07:00
parent 7c0aca5b0c
commit 7fd772803e
1 changed files with 9 additions and 0 deletions

View File

@ -294,9 +294,18 @@ int64_t run_op_getreadversion(FDBTransaction *transaction) {
return -1;
}
#if FDB_API_VERSION < 620
err = fdb_future_get_version(f, &rv);
#else
err = fdb_future_get_int64(f, &rv);
#endif
if (err) {
#if FDB_API_VERSION < 620
fprintf(stderr, "ERROR: fdb_future_get_version: %s\n", fdb_get_error(err));
#else
fprintf(stderr, "ERROR: fdb_future_get_int64: %s\n", fdb_get_error(err));
#endif
}
fdb_future_destroy(f);
return rv;