From 285e1a1ccc677a02032a86b7d6749e82ac3e4937 Mon Sep 17 00:00:00 2001 From: Alec Grieser Date: Thu, 1 Mar 2018 16:16:24 -0800 Subject: [PATCH] bump API version to 520 --- bindings/bindingtester/__init__.py | 2 +- bindings/bindingtester/bindingtester.py | 5 +++-- bindings/bindingtester/known_testers.py | 2 +- bindings/bindingtester/tests/scripted.py | 2 +- bindings/c/fdb_c.cpp | 2 +- bindings/c/foundationdb/fdb_c.h | 4 ++-- bindings/c/test/performance_test.c | 2 +- bindings/c/test/ryw_benchmark.c | 2 +- bindings/c/test/test.h | 2 +- bindings/flow/fdb_flow.h | 2 +- bindings/go/README.md | 2 +- bindings/go/src/fdb/cluster.go | 2 +- bindings/go/src/fdb/database.go | 2 +- bindings/go/src/fdb/errors.go | 2 +- bindings/go/src/fdb/fdb.go | 8 ++++---- bindings/go/src/fdb/futures.go | 2 +- bindings/go/src/fdb/range.go | 2 +- bindings/go/src/fdb/transaction.go | 2 +- bindings/java/fdbJNI.cpp | 2 +- bindings/java/src/main/com/apple/foundationdb/FDB.java | 6 +++--- bindings/java/src/main/overview.html.in | 4 ++-- .../test/com/apple/foundationdb/test/AbstractTester.java | 2 +- .../com/apple/foundationdb/test/BlockingBenchmark.java | 2 +- .../com/apple/foundationdb/test/ConcurrentGetSetGet.java | 2 +- .../test/com/apple/foundationdb/test/DirectoryTest.java | 2 +- .../src/test/com/apple/foundationdb/test/Example.java | 2 +- .../test/com/apple/foundationdb/test/IterableTest.java | 2 +- .../test/com/apple/foundationdb/test/LocalityTests.java | 2 +- .../com/apple/foundationdb/test/ParallelRandomScan.java | 2 +- .../src/test/com/apple/foundationdb/test/RangeTest.java | 2 +- .../test/com/apple/foundationdb/test/SerialInsertion.java | 2 +- .../test/com/apple/foundationdb/test/SerialIteration.java | 2 +- .../src/test/com/apple/foundationdb/test/SerialTest.java | 2 +- .../src/test/com/apple/foundationdb/test/TupleTest.java | 2 +- .../apple/foundationdb/test/VersionstampSmokeTest.java | 2 +- .../src/test/com/apple/foundationdb/test/WatchTest.java | 2 +- bindings/nodejs/lib/fdb.js | 4 ++-- bindings/nodejs/src/Version.h | 2 +- bindings/nodejs/tests/tuple_test.js | 2 +- bindings/python/fdb/__init__.py | 2 +- bindings/ruby/lib/fdb.rb | 2 +- recipes/go-recipes/blob.go | 2 +- recipes/go-recipes/doc.go | 2 +- recipes/go-recipes/graph.go | 2 +- recipes/go-recipes/indirect.go | 2 +- recipes/go-recipes/multi.go | 2 +- recipes/go-recipes/priority.go | 2 +- recipes/go-recipes/queue.go | 2 +- recipes/go-recipes/table.go | 2 +- 49 files changed, 59 insertions(+), 58 deletions(-) diff --git a/bindings/bindingtester/__init__.py b/bindings/bindingtester/__init__.py index b4daa2d619..cfc472b176 100644 --- a/bindings/bindingtester/__init__.py +++ b/bindings/bindingtester/__init__.py @@ -25,7 +25,7 @@ sys.path[:0] = [os.path.join(os.path.dirname(__file__), '..', '..', 'bindings', import util -FDB_API_VERSION = 510 +FDB_API_VERSION = 520 LOGGING = { 'version': 1, diff --git a/bindings/bindingtester/bindingtester.py b/bindings/bindingtester/bindingtester.py index d2ee47e7ec..1371bdf415 100755 --- a/bindings/bindingtester/bindingtester.py +++ b/bindings/bindingtester/bindingtester.py @@ -140,8 +140,9 @@ def choose_api_version(selected_api_version, tester_min_version, tester_max_vers elif random.random() < 0.7: api_version = min_version elif random.random() < 0.9: - api_version = random.choice([v for v in [13, 14, 16, 21, 22, 23, 100, 200, 300, 400, 410, 420, 430, - 440, 450, 460, 500, 510] if v >= min_version and v <= max_version]) + api_versions = filter(lambda v: v >= min_version and v <= max_version, + [13, 14, 16, 21, 22, 23, 100, 200, 300] + list(range(min(400, max_version), max_version + 1, 10))) + api_version = random.choice(api_versions) else: api_version = random.randint(min_version, max_version) diff --git a/bindings/bindingtester/known_testers.py b/bindings/bindingtester/known_testers.py index 683d79eba9..d2a5475a62 100644 --- a/bindings/bindingtester/known_testers.py +++ b/bindings/bindingtester/known_testers.py @@ -20,7 +20,7 @@ import os -MAX_API_VERSION = 510 +MAX_API_VERSION = 520 COMMON_TYPES = ['null', 'bytes', 'string', 'int', 'uuid', 'bool', 'float', 'double', 'tuple'] ALL_TYPES = COMMON_TYPES + ['versionstamp'] diff --git a/bindings/bindingtester/tests/scripted.py b/bindings/bindingtester/tests/scripted.py index 66abc68a18..dd768957b9 100644 --- a/bindings/bindingtester/tests/scripted.py +++ b/bindings/bindingtester/tests/scripted.py @@ -34,7 +34,7 @@ fdb.api_version(FDB_API_VERSION) class ScriptedTest(Test): - TEST_API_VERSION = 510 + TEST_API_VERSION = 520 def __init__(self, subspace): super(ScriptedTest, self).__init__(subspace, ScriptedTest.TEST_API_VERSION, ScriptedTest.TEST_API_VERSION) diff --git a/bindings/c/fdb_c.cpp b/bindings/c/fdb_c.cpp index f5bc7e453d..a51d51a7e2 100644 --- a/bindings/c/fdb_c.cpp +++ b/bindings/c/fdb_c.cpp @@ -18,7 +18,7 @@ * limitations under the License. */ -#define FDB_API_VERSION 510 +#define FDB_API_VERSION 520 #include "fdbclient/MultiVersionTransaction.h" #include "foundationdb/fdb_c.h" diff --git a/bindings/c/foundationdb/fdb_c.h b/bindings/c/foundationdb/fdb_c.h index 8571d59e80..059c88e0a4 100644 --- a/bindings/c/foundationdb/fdb_c.h +++ b/bindings/c/foundationdb/fdb_c.h @@ -28,10 +28,10 @@ #endif #if !defined(FDB_API_VERSION) -#error You must #define FDB_API_VERSION prior to including fdb_c.h (current version is 510) +#error You must #define FDB_API_VERSION prior to including fdb_c.h (current version is 520) #elif FDB_API_VERSION < 13 #error API version no longer supported (upgrade to 13) -#elif FDB_API_VERSION > 510 +#elif FDB_API_VERSION > 520 #error Requested API version requires a newer version of this header #endif diff --git a/bindings/c/test/performance_test.c b/bindings/c/test/performance_test.c index 2b355f2749..953953c1f6 100644 --- a/bindings/c/test/performance_test.c +++ b/bindings/c/test/performance_test.c @@ -602,7 +602,7 @@ void runTests(struct ResultSet *rs) { int main(int argc, char **argv) { srand(time(NULL)); struct ResultSet *rs = newResultSet(); - checkError(fdb_select_api_version(510), "select API version", rs); + checkError(fdb_select_api_version(520), "select API version", rs); printf("Running performance test at client version: %s\n", fdb_get_client_version()); valueStr = (uint8_t*)malloc((sizeof(uint8_t))*valueSize); diff --git a/bindings/c/test/ryw_benchmark.c b/bindings/c/test/ryw_benchmark.c index 47cd8cd23b..e7c291209d 100644 --- a/bindings/c/test/ryw_benchmark.c +++ b/bindings/c/test/ryw_benchmark.c @@ -243,7 +243,7 @@ void runTests(struct ResultSet *rs) { int main(int argc, char **argv) { srand(time(NULL)); struct ResultSet *rs = newResultSet(); - checkError(fdb_select_api_version(510), "select API version", rs); + checkError(fdb_select_api_version(520), "select API version", rs); printf("Running RYW Benchmark test at client version: %s\n", fdb_get_client_version()); keys = generateKeys(numKeys, keySize); diff --git a/bindings/c/test/test.h b/bindings/c/test/test.h index 19bc075c07..adf4403640 100644 --- a/bindings/c/test/test.h +++ b/bindings/c/test/test.h @@ -27,7 +27,7 @@ #include #ifndef FDB_API_VERSION -#define FDB_API_VERSION 510 +#define FDB_API_VERSION 520 #endif #include diff --git a/bindings/flow/fdb_flow.h b/bindings/flow/fdb_flow.h index 782aac0d58..d1ffebd211 100644 --- a/bindings/flow/fdb_flow.h +++ b/bindings/flow/fdb_flow.h @@ -23,7 +23,7 @@ #include -#define FDB_API_VERSION 510 +#define FDB_API_VERSION 520 #include #undef DLLEXPORT diff --git a/bindings/go/README.md b/bindings/go/README.md index d06a5dc656..48e2e1fdf0 100644 --- a/bindings/go/README.md +++ b/bindings/go/README.md @@ -8,7 +8,7 @@ This package requires: - Go 1.1+ with CGO enabled - FoundationDB C API 2.0.x, 3.0.x, or 4.x.y (part of the [FoundationDB clients package](https://files.foundationdb.org/fdb-c/)) -Use of this package requires the selection of a FoundationDB API version at runtime. This package currently supports FoundationDB API versions 200-510. +Use of this package requires the selection of a FoundationDB API version at runtime. This package currently supports FoundationDB API versions 200-520. To build this package, in the top level of this repository run: diff --git a/bindings/go/src/fdb/cluster.go b/bindings/go/src/fdb/cluster.go index b9adb3f1a2..3c8a398860 100644 --- a/bindings/go/src/fdb/cluster.go +++ b/bindings/go/src/fdb/cluster.go @@ -23,7 +23,7 @@ package fdb /* - #define FDB_API_VERSION 510 + #define FDB_API_VERSION 520 #include */ import "C" diff --git a/bindings/go/src/fdb/database.go b/bindings/go/src/fdb/database.go index b8a37bda5c..7b75e6da1f 100644 --- a/bindings/go/src/fdb/database.go +++ b/bindings/go/src/fdb/database.go @@ -23,7 +23,7 @@ package fdb /* - #define FDB_API_VERSION 510 + #define FDB_API_VERSION 520 #include */ import "C" diff --git a/bindings/go/src/fdb/errors.go b/bindings/go/src/fdb/errors.go index aa9db8b77b..393b1cdd19 100644 --- a/bindings/go/src/fdb/errors.go +++ b/bindings/go/src/fdb/errors.go @@ -23,7 +23,7 @@ package fdb /* - #define FDB_API_VERSION 510 + #define FDB_API_VERSION 520 #include */ import "C" diff --git a/bindings/go/src/fdb/fdb.go b/bindings/go/src/fdb/fdb.go index 23f3a68e51..7fe7835e7a 100644 --- a/bindings/go/src/fdb/fdb.go +++ b/bindings/go/src/fdb/fdb.go @@ -23,7 +23,7 @@ package fdb /* - #define FDB_API_VERSION 510 + #define FDB_API_VERSION 520 #include #include */ @@ -109,7 +109,7 @@ func (opt NetworkOptions) setOpt(code int, param []byte) error { // library, an error will be returned. APIVersion must be called prior to any // other functions in the fdb package. // -// Currently, this package supports API versions 200 through 510. +// Currently, this package supports API versions 200 through 520. // // Warning: When using the multi-version client API, setting an API version that // is not supported by a particular client library will prevent that client from @@ -117,7 +117,7 @@ func (opt NetworkOptions) setOpt(code int, param []byte) error { // the API version of your application after upgrading your client until the // cluster has also been upgraded. func APIVersion(version int) error { - headerVersion := 510 + headerVersion := 520 networkMutex.Lock() defer networkMutex.Unlock() @@ -129,7 +129,7 @@ func APIVersion(version int) error { return errAPIVersionAlreadySet } - if version < 200 || version > 510 { + if version < 200 || version > 520 { return errAPIVersionNotSupported } diff --git a/bindings/go/src/fdb/futures.go b/bindings/go/src/fdb/futures.go index f0da9fe21b..e3be4f2b8e 100644 --- a/bindings/go/src/fdb/futures.go +++ b/bindings/go/src/fdb/futures.go @@ -24,7 +24,7 @@ package fdb /* #cgo LDFLAGS: -lfdb_c -lm - #define FDB_API_VERSION 510 + #define FDB_API_VERSION 520 #include #include diff --git a/bindings/go/src/fdb/range.go b/bindings/go/src/fdb/range.go index 4155128c80..c0b17662df 100644 --- a/bindings/go/src/fdb/range.go +++ b/bindings/go/src/fdb/range.go @@ -23,7 +23,7 @@ package fdb /* - #define FDB_API_VERSION 510 + #define FDB_API_VERSION 520 #include */ import "C" diff --git a/bindings/go/src/fdb/transaction.go b/bindings/go/src/fdb/transaction.go index 52deb06c9b..f68dbef837 100644 --- a/bindings/go/src/fdb/transaction.go +++ b/bindings/go/src/fdb/transaction.go @@ -23,7 +23,7 @@ package fdb /* - #define FDB_API_VERSION 510 + #define FDB_API_VERSION 520 #include */ import "C" diff --git a/bindings/java/fdbJNI.cpp b/bindings/java/fdbJNI.cpp index e7d663075b..e912474d9c 100644 --- a/bindings/java/fdbJNI.cpp +++ b/bindings/java/fdbJNI.cpp @@ -21,7 +21,7 @@ #include #include -#define FDB_API_VERSION 510 +#define FDB_API_VERSION 520 #include diff --git a/bindings/java/src/main/com/apple/foundationdb/FDB.java b/bindings/java/src/main/com/apple/foundationdb/FDB.java index ffc159a308..9b3e4e4eed 100644 --- a/bindings/java/src/main/com/apple/foundationdb/FDB.java +++ b/bindings/java/src/main/com/apple/foundationdb/FDB.java @@ -35,7 +35,7 @@ import java.util.concurrent.atomic.AtomicInteger; * This call is required before using any other part of the API. The call allows * an error to be thrown at this point to prevent client code from accessing a later library * with incorrect assumptions from the current version. The API version documented here is version - * {@code 510}.

+ * {@code 520}.

* FoundationDB encapsulates multiple versions of its interface by requiring * the client to explicitly specify the version of the API it uses. The purpose * of this design is to allow you to upgrade the server, client libraries, or @@ -150,8 +150,8 @@ public class FDB { } if(version < 510) throw new IllegalArgumentException("API version not supported (minimum 510)"); - if(version > 510) - throw new IllegalArgumentException("API version not supported (maximum 510)"); + if(version > 520) + throw new IllegalArgumentException("API version not supported (maximum 520)"); Select_API_version(version); FDB fdb = new FDB(version); diff --git a/bindings/java/src/main/overview.html.in b/bindings/java/src/main/overview.html.in index 1ced4b320b..25a4f7b6e5 100644 --- a/bindings/java/src/main/overview.html.in +++ b/bindings/java/src/main/overview.html.in @@ -25,7 +25,7 @@ and add it to your classpath.

Getting started

To start using FoundationDB from Java, create an instance of the {@link com.apple.foundationdb.FDB FoundationDB API interface} with the version of the -API that you want to use (this release of the FoundationDB Java API supports only version {@code 510}). +API that you want to use (this release of the FoundationDB Java API supports versions between {@code 510} and {@code 520}). With this API object you can then open {@link com.apple.foundationdb.Cluster Cluster}s and {@link com.apple.foundationdb.Database Database}s and start using {@link com.apple.foundationdb.Transaction Transaction}s. @@ -41,7 +41,7 @@ import com.apple.foundationdb.tuple.Tuple; public class Example { public static void main(String[] args) { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); try(Database db = fdb.open()) { // Run an operation on the database diff --git a/bindings/java/src/test/com/apple/foundationdb/test/AbstractTester.java b/bindings/java/src/test/com/apple/foundationdb/test/AbstractTester.java index b1b34c519f..038bf87db5 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/AbstractTester.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/AbstractTester.java @@ -27,7 +27,7 @@ import com.apple.foundationdb.Database; import com.apple.foundationdb.FDB; public abstract class AbstractTester { - public static final int API_VERSION = 510; + public static final int API_VERSION = 520; protected static final int NUM_RUNS = 25; protected static final Charset ASCII = Charset.forName("ASCII"); diff --git a/bindings/java/src/test/com/apple/foundationdb/test/BlockingBenchmark.java b/bindings/java/src/test/com/apple/foundationdb/test/BlockingBenchmark.java index 901120b65c..df8d51c726 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/BlockingBenchmark.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/BlockingBenchmark.java @@ -33,7 +33,7 @@ public class BlockingBenchmark { private static final int PARALLEL = 100; public static void main(String[] args) throws InterruptedException { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); // The cluster file DOES NOT need to be valid, although it must exist. // This is because the database is never really contacted in this test. diff --git a/bindings/java/src/test/com/apple/foundationdb/test/ConcurrentGetSetGet.java b/bindings/java/src/test/com/apple/foundationdb/test/ConcurrentGetSetGet.java index 3531c06b5e..d920ae566d 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/ConcurrentGetSetGet.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/ConcurrentGetSetGet.java @@ -48,7 +48,7 @@ public class ConcurrentGetSetGet { } public static void main(String[] args) { - try(Database database = FDB.selectAPIVersion(510).open()) { + try(Database database = FDB.selectAPIVersion(520).open()) { new ConcurrentGetSetGet().apply(database); } } diff --git a/bindings/java/src/test/com/apple/foundationdb/test/DirectoryTest.java b/bindings/java/src/test/com/apple/foundationdb/test/DirectoryTest.java index 79e99fe474..3705bb9cc1 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/DirectoryTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/DirectoryTest.java @@ -34,7 +34,7 @@ import com.apple.foundationdb.directory.DirectorySubspace; public class DirectoryTest { public static void main(String[] args) throws Exception { try { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); try(Database db = fdb.open()) { runTests(db); } diff --git a/bindings/java/src/test/com/apple/foundationdb/test/Example.java b/bindings/java/src/test/com/apple/foundationdb/test/Example.java index 0ff9f1e6ef..a543fa2e4a 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/Example.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/Example.java @@ -26,7 +26,7 @@ import com.apple.foundationdb.tuple.Tuple; public class Example { public static void main(String[] args) { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); try(Database db = fdb.open()) { // Run an operation on the database diff --git a/bindings/java/src/test/com/apple/foundationdb/test/IterableTest.java b/bindings/java/src/test/com/apple/foundationdb/test/IterableTest.java index e9fa4cf3ec..68b40d717d 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/IterableTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/IterableTest.java @@ -32,7 +32,7 @@ public class IterableTest { public static void main(String[] args) throws InterruptedException { final int reps = 1000; try { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); try(Database db = fdb.open()) { runTests(reps, db); } diff --git a/bindings/java/src/test/com/apple/foundationdb/test/LocalityTests.java b/bindings/java/src/test/com/apple/foundationdb/test/LocalityTests.java index 5ed8fcbb8b..4aea234fbc 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/LocalityTests.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/LocalityTests.java @@ -34,7 +34,7 @@ import com.apple.foundationdb.tuple.ByteArrayUtil; public class LocalityTests { public static void main(String[] args) { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); try(Database database = fdb.open(args[0])) { try(Transaction tr = database.createTransaction()) { String[] keyAddresses = LocalityUtil.getAddressesForKey(tr, "a".getBytes()).join(); diff --git a/bindings/java/src/test/com/apple/foundationdb/test/ParallelRandomScan.java b/bindings/java/src/test/com/apple/foundationdb/test/ParallelRandomScan.java index f9ebf13848..0c3cc69068 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/ParallelRandomScan.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/ParallelRandomScan.java @@ -43,7 +43,7 @@ public class ParallelRandomScan { private static final int PARALLELISM_STEP = 5; public static void main(String[] args) throws InterruptedException { - FDB api = FDB.selectAPIVersion(510); + FDB api = FDB.selectAPIVersion(520); try(Database database = api.open(args[0])) { for(int i = PARALLELISM_MIN; i <= PARALLELISM_MAX; i += PARALLELISM_STEP) { runTest(database, i, ROWS, DURATION_MS); diff --git a/bindings/java/src/test/com/apple/foundationdb/test/RangeTest.java b/bindings/java/src/test/com/apple/foundationdb/test/RangeTest.java index bc43d959a8..f57f53c5a1 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/RangeTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/RangeTest.java @@ -34,7 +34,7 @@ import com.apple.foundationdb.Transaction; import com.apple.foundationdb.async.AsyncIterable; public class RangeTest { - private static final int API_VERSION = 510; + private static final int API_VERSION = 520; public static void main(String[] args) { System.out.println("About to use version " + API_VERSION); diff --git a/bindings/java/src/test/com/apple/foundationdb/test/SerialInsertion.java b/bindings/java/src/test/com/apple/foundationdb/test/SerialInsertion.java index cebb5ed0af..5645267dc2 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/SerialInsertion.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/SerialInsertion.java @@ -34,7 +34,7 @@ public class SerialInsertion { private static final int NODES = 1000000; public static void main(String[] args) { - FDB api = FDB.selectAPIVersion(510); + FDB api = FDB.selectAPIVersion(520); try(Database database = api.open()) { long start = System.currentTimeMillis(); diff --git a/bindings/java/src/test/com/apple/foundationdb/test/SerialIteration.java b/bindings/java/src/test/com/apple/foundationdb/test/SerialIteration.java index 8e62e5303b..5b30fa1a70 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/SerialIteration.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/SerialIteration.java @@ -39,7 +39,7 @@ public class SerialIteration { private static final int THREAD_COUNT = 1; public static void main(String[] args) throws InterruptedException { - FDB api = FDB.selectAPIVersion(510); + FDB api = FDB.selectAPIVersion(520); try(Database database = api.open(args[0])) { for(int i = 1; i <= THREAD_COUNT; i++) { runThreadedTest(database, i); diff --git a/bindings/java/src/test/com/apple/foundationdb/test/SerialTest.java b/bindings/java/src/test/com/apple/foundationdb/test/SerialTest.java index ef638c4115..a1feba6df6 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/SerialTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/SerialTest.java @@ -31,7 +31,7 @@ public class SerialTest { public static void main(String[] args) throws InterruptedException { final int reps = 1000; try { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); try(Database db = fdb.open()) { runTests(reps, db); } diff --git a/bindings/java/src/test/com/apple/foundationdb/test/TupleTest.java b/bindings/java/src/test/com/apple/foundationdb/test/TupleTest.java index ff7ee90b27..476ba64ff3 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/TupleTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/TupleTest.java @@ -30,7 +30,7 @@ public class TupleTest { public static void main(String[] args) throws InterruptedException { final int reps = 1000; try { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); try(Database db = fdb.open()) { runTests(reps, db); } diff --git a/bindings/java/src/test/com/apple/foundationdb/test/VersionstampSmokeTest.java b/bindings/java/src/test/com/apple/foundationdb/test/VersionstampSmokeTest.java index b4908b2a9a..80008db49f 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/VersionstampSmokeTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/VersionstampSmokeTest.java @@ -32,7 +32,7 @@ import com.apple.foundationdb.tuple.Versionstamp; public class VersionstampSmokeTest { public static void main(String[] args) { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); try(Database db = fdb.open()) { db.run(tr -> { tr.clear(Tuple.from("prefix").range()); diff --git a/bindings/java/src/test/com/apple/foundationdb/test/WatchTest.java b/bindings/java/src/test/com/apple/foundationdb/test/WatchTest.java index cb4d7f4826..73efab5c45 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/WatchTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/WatchTest.java @@ -34,7 +34,7 @@ import com.apple.foundationdb.Transaction; public class WatchTest { public static void main(String[] args) { - FDB fdb = FDB.selectAPIVersion(510); + FDB fdb = FDB.selectAPIVersion(520); try(Database database = fdb.open(args[0])) { database.options().setLocationCacheSize(42); try(Transaction tr = database.createTransaction()) { diff --git a/bindings/nodejs/lib/fdb.js b/bindings/nodejs/lib/fdb.js index 056a3bad41..8ddb8a3271 100644 --- a/bindings/nodejs/lib/fdb.js +++ b/bindings/nodejs/lib/fdb.js @@ -43,8 +43,8 @@ module.exports = { throw new Error('Cannot select multiple different FDB API versions'); if(version < 500) throw new RangeError('FDB API versions before 500 are not supported'); - if(version > 510) - throw new RangeError('Latest known FDB API version is 510'); + if(version > 520) + throw new RangeError('Latest known FDB API version is 520'); if(!selectedApiVersion.value) { fdb.apiVersion(version); diff --git a/bindings/nodejs/src/Version.h b/bindings/nodejs/src/Version.h index adcc23662f..a5139ea02c 100644 --- a/bindings/nodejs/src/Version.h +++ b/bindings/nodejs/src/Version.h @@ -22,6 +22,6 @@ #ifndef FDB_NODE_VERSION_H #define FDB_NODE_VERSION_H -#define FDB_API_VERSION 510 +#define FDB_API_VERSION 520 #endif diff --git a/bindings/nodejs/tests/tuple_test.js b/bindings/nodejs/tests/tuple_test.js index dc59733623..981e8431ed 100755 --- a/bindings/nodejs/tests/tuple_test.js +++ b/bindings/nodejs/tests/tuple_test.js @@ -18,7 +18,7 @@ * limitations under the License. */ -var fdb = require('../lib/fdb.js').apiVersion(510); +var fdb = require('../lib/fdb.js').apiVersion(520); var fdbModule = require('../lib/fdbModule.js'); console.log(fdb.tuple.pack([-Math.pow(2,53)])); diff --git a/bindings/python/fdb/__init__.py b/bindings/python/fdb/__init__.py index 79e76d2063..11b1636a3f 100644 --- a/bindings/python/fdb/__init__.py +++ b/bindings/python/fdb/__init__.py @@ -41,7 +41,7 @@ def _add_symbols(module, symbols): def api_version(ver): - header_version = 510 + header_version = 520 if '_version' in globals(): if globals()['_version'] != ver: diff --git a/bindings/ruby/lib/fdb.rb b/bindings/ruby/lib/fdb.rb index d7cd1c49f5..0f88b11d6e 100644 --- a/bindings/ruby/lib/fdb.rb +++ b/bindings/ruby/lib/fdb.rb @@ -26,7 +26,7 @@ module FDB @@chosen_version = -1 def self.api_version(version) - header_version = 510 + header_version = 520 if @@chosen_version >= 0 if@@chosen_version != version raise "FDB API already loaded at version #{@@chosen_version}." diff --git a/recipes/go-recipes/blob.go b/recipes/go-recipes/blob.go index 92dc5097ec..0636cb7ed8 100644 --- a/recipes/go-recipes/blob.go +++ b/recipes/go-recipes/blob.go @@ -78,7 +78,7 @@ func read_blob(t fdb.ReadTransactor, blob_subspace subspace.Subspace) ([]byte, e } func main() { - fdb.MustAPIVersion(510) + fdb.MustAPIVersion(520) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/doc.go b/recipes/go-recipes/doc.go index 441a5cd176..fe0c5d8b77 100644 --- a/recipes/go-recipes/doc.go +++ b/recipes/go-recipes/doc.go @@ -219,7 +219,7 @@ func (doc Doc) GetDoc(trtr fdb.Transactor, doc_id int) interface{} { } func main() { - fdb.MustAPIVersion(510) + fdb.MustAPIVersion(520) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/graph.go b/recipes/go-recipes/graph.go index 8e9c3c0ec3..1c0f603e93 100644 --- a/recipes/go-recipes/graph.go +++ b/recipes/go-recipes/graph.go @@ -124,7 +124,7 @@ func (graph *Graph) get_in_neighbors(trtr fdb.Transactor, node int) ([]int, erro } func main() { - fdb.MustAPIVersion(510) + fdb.MustAPIVersion(520) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/indirect.go b/recipes/go-recipes/indirect.go index 1336bc33dd..f4deb27922 100644 --- a/recipes/go-recipes/indirect.go +++ b/recipes/go-recipes/indirect.go @@ -93,7 +93,7 @@ func (wrkspc Workspace) Session(foo func(directory.DirectorySubspace)) (err erro } func main() { - fdb.MustAPIVersion(510) + fdb.MustAPIVersion(520) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/multi.go b/recipes/go-recipes/multi.go index 6d933fb816..5d12c8e8fd 100644 --- a/recipes/go-recipes/multi.go +++ b/recipes/go-recipes/multi.go @@ -132,7 +132,7 @@ func (multi MultiMap) MultiIsElement(trtr fdb.Transactor, index, value interface func main() { - fdb.MustAPIVersion(510) + fdb.MustAPIVersion(520) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/priority.go b/recipes/go-recipes/priority.go index c2639e0ccc..ddfba39f3a 100644 --- a/recipes/go-recipes/priority.go +++ b/recipes/go-recipes/priority.go @@ -117,7 +117,7 @@ func (prty Priority) Peek(trtr fdb.Transactor, max bool) interface{} { } func main() { - fdb.MustAPIVersion(510) + fdb.MustAPIVersion(520) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/queue.go b/recipes/go-recipes/queue.go index 6fa2ce0b00..736559f72c 100644 --- a/recipes/go-recipes/queue.go +++ b/recipes/go-recipes/queue.go @@ -107,7 +107,7 @@ func (q *Queue) FirstItem(trtr fdb.Transactor) (interface{}, error) { func main() { fmt.Println("Queue Example Program") - fdb.MustAPIVersion(510) + fdb.MustAPIVersion(520) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/table.go b/recipes/go-recipes/table.go index 7bc15735ac..e32685ec0f 100644 --- a/recipes/go-recipes/table.go +++ b/recipes/go-recipes/table.go @@ -144,7 +144,7 @@ func (tbl Table) TableGetCol(tr fdb.ReadTransactor, col int) ([]interface{}, err } func main() { - fdb.MustAPIVersion(510) + fdb.MustAPIVersion(520) db := fdb.MustOpenDefault()