Open mitya-borodin opened 3 years ago
Works fine for me. What version of foundationdb do you have installed? (Find out with fdbcli --version
)
$ fdbcli --version
FoundationDB CLI 6.2 (v6.2.28)
We currently use FDB version 6.2.15
, FDB client version 6.2.28
. This problem only occurs on lib version 1.1.2
, but everything is fine for 1.1.1
.
Reproduced this issue on fdb 6.2.15.
Yeah, I'm not sure what the right approach is here. I've reached out to the foundationdb developers forum about it to see if anyone has a recommendation about how to proceed.
The issue is that foundationdb 6.2.15 doesn't support API version 630 and bumping the header version unfortunately has had the downstream consequence of increasing the minimum supported version of foundationdb.
There's no new changes in node-foundationdb@1.1.2 except adding support for API version 630, and if you're using foundationdb 6.2.15 then you can't use those new features anyway.
So workarounds, in order of preference:
import * as fdb from 'foundationdb';
fdb.setAPIVersion(600, 600)
But I honestly don't understand enough about how the header version is used to know what this will actually do. I think it'll either work or crash instantly. YMMV. Hopefully some of the core foundationdb team have some better suggestions to handle this situation better in the future.
We managed to solve this using the multi-version client.
Here's a part of the Dockerfile where we install FDB client 6.3.23 and an extra client library version 6.2.30:
# install FoundationDB client library
RUN wget -q https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_amd64.deb \
&& dpkg -i foundationdb-clients_6.3.23-1_amd64.deb \
&& rm foundationdb-clients_6.3.23-1_amd64.deb
# install older FoundationDB client library for compatibility with 6.2
RUN wget -q https://github.com/apple/foundationdb/releases/download/6.2.30/libfdb_c.x86_64.so \
&& mkdir -p /usr/lib/foundationdb/multiversion \
&& mv libfdb_c.x86_64.so /usr/lib/foundationdb/multiversion/libfdbc_6.2.30.so
# set up multi-version client
ENV FDB_NETWORK_OPTION_EXTERNAL_CLIENT_DIRECTORY /usr/lib/foundationdb/multiversion
We use node-foundationdb
of version 1.1.3
and set
fdb.setAPIVersion(620); // 600 works too
This setup also allows us to upgrade FDB server from 6.2 to 6.3 with no downtime.
I try to set up 600 API version:
and I catch error: