From a167bf344e87946376f6e02243e37c831c7f7299 Mon Sep 17 00:00:00 2001 From: Balachandar Namasivayam Date: Wed, 27 May 2020 19:51:17 -0700 Subject: [PATCH 1/3] Update api version to 700 --- bindings/bindingtester/__init__.py | 2 +- bindings/bindingtester/bindingtester.py | 2 +- bindings/bindingtester/known_testers.py | 2 +- bindings/bindingtester/tests/scripted.py | 2 +- bindings/c/fdb_c.cpp | 2 +- bindings/c/foundationdb/fdb_c.h | 6 +++--- bindings/c/test/mako/mako.h | 2 +- bindings/c/test/performance_test.c | 2 +- bindings/c/test/ryw_benchmark.c | 2 +- bindings/c/test/test.h | 2 +- bindings/c/test/txn_size_test.c | 2 +- bindings/c/test/workloads/SimpleWorkload.cpp | 4 ++-- bindings/flow/fdb_flow.actor.cpp | 4 ++-- bindings/flow/fdb_flow.h | 2 +- bindings/flow/tester/Tester.actor.cpp | 2 +- bindings/go/README.md | 2 +- bindings/go/src/fdb/cluster.go | 2 +- bindings/go/src/fdb/database.go | 2 +- bindings/go/src/fdb/doc.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/JavaWorkload.cpp | 4 ++-- 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 +- .../apple/foundationdb/test/SnapshotTransactionTest.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/python/fdb/__init__.py | 2 +- bindings/python/fdb/impl.py | 2 +- bindings/python/tests/size_limit_tests.py | 2 +- bindings/ruby/lib/fdb.rb | 2 +- build/cmake/package_tester/fdb_c_app/app.c | 4 ++-- build/cmake/package_tester/modules/tests.sh | 2 +- documentation/sphinx/source/api-c.rst | 2 +- documentation/sphinx/source/api-common.rst.inc | 2 +- documentation/sphinx/source/api-python.rst | 2 +- documentation/sphinx/source/api-ruby.rst | 2 +- documentation/sphinx/source/api-version-upgrade-guide.rst | 4 ++-- documentation/sphinx/source/class-scheduling-go.rst | 6 +++--- documentation/sphinx/source/class-scheduling-java.rst | 6 +++--- documentation/sphinx/source/class-scheduling-ruby.rst | 6 +++--- documentation/sphinx/source/class-scheduling.rst | 8 ++++---- .../sphinx/source/hierarchical-documents-java.rst | 2 +- documentation/sphinx/source/multimaps-java.rst | 2 +- documentation/sphinx/source/priority-queues-java.rst | 2 +- documentation/sphinx/source/queues-java.rst | 2 +- documentation/sphinx/source/release-notes.rst | 2 +- documentation/sphinx/source/simple-indexes-java.rst | 2 +- documentation/sphinx/source/tables-java.rst | 2 +- documentation/sphinx/source/vector-java.rst | 2 +- fdbclient/MultiVersionTransaction.actor.cpp | 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 +- 76 files changed, 98 insertions(+), 98 deletions(-) diff --git a/bindings/bindingtester/__init__.py b/bindings/bindingtester/__init__.py index 0adababb92..f8ad0030e2 100644 --- a/bindings/bindingtester/__init__.py +++ b/bindings/bindingtester/__init__.py @@ -26,7 +26,7 @@ sys.path[:0] = [os.path.join(os.path.dirname(__file__), '..', '..', 'bindings', import util -FDB_API_VERSION = 630 +FDB_API_VERSION = 700 LOGGING = { 'version': 1, diff --git a/bindings/bindingtester/bindingtester.py b/bindings/bindingtester/bindingtester.py index 6feed3b283..58db70f5db 100755 --- a/bindings/bindingtester/bindingtester.py +++ b/bindings/bindingtester/bindingtester.py @@ -157,7 +157,7 @@ def choose_api_version(selected_api_version, tester_min_version, tester_max_vers 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, 520, 600, 610, 620, 630] if v >= min_version and v <= max_version]) + 440, 450, 460, 500, 510, 520, 600, 610, 620, 630, 700] if v >= min_version and v <= max_version]) else: api_version = random.randint(min_version, max_version) diff --git a/bindings/bindingtester/known_testers.py b/bindings/bindingtester/known_testers.py index ee82663411..e1522039db 100644 --- a/bindings/bindingtester/known_testers.py +++ b/bindings/bindingtester/known_testers.py @@ -20,7 +20,7 @@ import os -MAX_API_VERSION = 630 +MAX_API_VERSION = 700 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 60b1959864..c113ebc07f 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 = 630 + TEST_API_VERSION = 700 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 dae60c7ea8..ba56744dc7 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 630 +#define FDB_API_VERSION 700 #define FDB_INCLUDE_LEGACY_TYPES #include "fdbclient/MultiVersionTransaction.h" diff --git a/bindings/c/foundationdb/fdb_c.h b/bindings/c/foundationdb/fdb_c.h index a930434819..b5dfa63d13 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 630) +#error You must #define FDB_API_VERSION prior to including fdb_c.h (current version is 700) #elif FDB_API_VERSION < 13 #error API version no longer supported (upgrade to 13) -#elif FDB_API_VERSION > 630 +#elif FDB_API_VERSION > 700 #error Requested API version requires a newer version of this header #endif @@ -91,7 +91,7 @@ extern "C" { DLLEXPORT WARN_UNUSED_RESULT fdb_error_t fdb_add_network_thread_completion_hook(void (*hook)(void*), void *hook_parameter); #pragma pack(push, 4) -#if FDB_API_VERSION >= 630 +#if FDB_API_VERSION >= 700 typedef struct keyvalue { const uint8_t* key; int key_length; diff --git a/bindings/c/test/mako/mako.h b/bindings/c/test/mako/mako.h index 4f703e7271..792dd1d6dc 100644 --- a/bindings/c/test/mako/mako.h +++ b/bindings/c/test/mako/mako.h @@ -3,7 +3,7 @@ #pragma once #ifndef FDB_API_VERSION -#define FDB_API_VERSION 630 +#define FDB_API_VERSION 700 #endif #include diff --git a/bindings/c/test/performance_test.c b/bindings/c/test/performance_test.c index 7a265e7d0f..319895554d 100644 --- a/bindings/c/test/performance_test.c +++ b/bindings/c/test/performance_test.c @@ -603,7 +603,7 @@ void runTests(struct ResultSet *rs) { int main(int argc, char **argv) { srand(time(NULL)); struct ResultSet *rs = newResultSet(); - checkError(fdb_select_api_version(630), "select API version", rs); + checkError(fdb_select_api_version(700), "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 cbb7fcf304..4604dc41a8 100644 --- a/bindings/c/test/ryw_benchmark.c +++ b/bindings/c/test/ryw_benchmark.c @@ -244,7 +244,7 @@ void runTests(struct ResultSet *rs) { int main(int argc, char **argv) { srand(time(NULL)); struct ResultSet *rs = newResultSet(); - checkError(fdb_select_api_version(630), "select API version", rs); + checkError(fdb_select_api_version(700), "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 5fb4268b78..7169689f76 100644 --- a/bindings/c/test/test.h +++ b/bindings/c/test/test.h @@ -29,7 +29,7 @@ #include #ifndef FDB_API_VERSION -#define FDB_API_VERSION 630 +#define FDB_API_VERSION 700 #endif #include diff --git a/bindings/c/test/txn_size_test.c b/bindings/c/test/txn_size_test.c index 4f2744d199..7aa5a18576 100644 --- a/bindings/c/test/txn_size_test.c +++ b/bindings/c/test/txn_size_test.c @@ -97,7 +97,7 @@ void runTests(struct ResultSet *rs) { int main(int argc, char **argv) { srand(time(NULL)); struct ResultSet *rs = newResultSet(); - checkError(fdb_select_api_version(630), "select API version", rs); + checkError(fdb_select_api_version(700), "select API version", rs); printf("Running performance test at client version: %s\n", fdb_get_client_version()); keys = generateKeys(numKeys, KEY_SIZE); diff --git a/bindings/c/test/workloads/SimpleWorkload.cpp b/bindings/c/test/workloads/SimpleWorkload.cpp index 35b18f71a3..7b19654874 100644 --- a/bindings/c/test/workloads/SimpleWorkload.cpp +++ b/bindings/c/test/workloads/SimpleWorkload.cpp @@ -18,7 +18,7 @@ * limitations under the License. */ -#define FDB_API_VERSION 630 +#define FDB_API_VERSION 700 #include "foundationdb/fdb_c.h" #undef DLLEXPORT #include "workloads.h" @@ -258,7 +258,7 @@ struct SimpleWorkload : FDBWorkload { insertsPerTx = context->getOption("insertsPerTx", 100ul); opsPerTx = context->getOption("opsPerTx", 100ul); runFor = context->getOption("runFor", 10.0); - auto err = fdb_select_api_version(630); + auto err = fdb_select_api_version(700); if (err) { context->trace(FDBSeverity::Info, "SelectAPIVersionFailed", { { "Error", std::string(fdb_get_error(err)) } }); diff --git a/bindings/flow/fdb_flow.actor.cpp b/bindings/flow/fdb_flow.actor.cpp index 3ed3d93700..5fd56e653d 100644 --- a/bindings/flow/fdb_flow.actor.cpp +++ b/bindings/flow/fdb_flow.actor.cpp @@ -36,7 +36,7 @@ THREAD_FUNC networkThread(void* fdb) { } ACTOR Future _test() { - API *fdb = FDB::API::selectAPIVersion(630); + API *fdb = FDB::API::selectAPIVersion(700); auto db = fdb->createDatabase(); state Reference tr = db->createTransaction(); @@ -79,7 +79,7 @@ ACTOR Future _test() { } void fdb_flow_test() { - API *fdb = FDB::API::selectAPIVersion(630); + API *fdb = FDB::API::selectAPIVersion(700); fdb->setupNetwork(); startThread(networkThread, fdb); diff --git a/bindings/flow/fdb_flow.h b/bindings/flow/fdb_flow.h index e261052fae..66049cae0c 100644 --- a/bindings/flow/fdb_flow.h +++ b/bindings/flow/fdb_flow.h @@ -23,7 +23,7 @@ #include -#define FDB_API_VERSION 630 +#define FDB_API_VERSION 700 #include #undef DLLEXPORT diff --git a/bindings/flow/tester/Tester.actor.cpp b/bindings/flow/tester/Tester.actor.cpp index a190299747..578f159f8c 100644 --- a/bindings/flow/tester/Tester.actor.cpp +++ b/bindings/flow/tester/Tester.actor.cpp @@ -1817,7 +1817,7 @@ ACTOR void _test_versionstamp() { try { g_network = newNet2(TLSConfig()); - API *fdb = FDB::API::selectAPIVersion(630); + API *fdb = FDB::API::selectAPIVersion(700); fdb->setupNetwork(); startThread(networkThread, fdb); diff --git a/bindings/go/README.md b/bindings/go/README.md index 7a03ea1d6f..8619e1692a 100644 --- a/bindings/go/README.md +++ b/bindings/go/README.md @@ -9,7 +9,7 @@ This package requires: - [Mono](http://www.mono-project.com/) (macOS or Linux) or [Visual Studio](https://www.visualstudio.com/) (Windows) (build-time only) - FoundationDB C API 2.0.x-6.1.x (part of the [FoundationDB client packages](https://apple.github.io/foundationdb/downloads.html#c)) -Use of this package requires the selection of a FoundationDB API version at runtime. This package currently supports FoundationDB API versions 200-630. +Use of this package requires the selection of a FoundationDB API version at runtime. This package currently supports FoundationDB API versions 200-700. To install this package, you can run the "fdb-go-install.sh" script (for versions 5.0.x and greater): diff --git a/bindings/go/src/fdb/cluster.go b/bindings/go/src/fdb/cluster.go index df895e9a51..5ab17b5273 100644 --- a/bindings/go/src/fdb/cluster.go +++ b/bindings/go/src/fdb/cluster.go @@ -22,7 +22,7 @@ package fdb -// #define FDB_API_VERSION 630 +// #define FDB_API_VERSION 700 // #include import "C" diff --git a/bindings/go/src/fdb/database.go b/bindings/go/src/fdb/database.go index 23cb4f19be..60f3f03d06 100644 --- a/bindings/go/src/fdb/database.go +++ b/bindings/go/src/fdb/database.go @@ -22,7 +22,7 @@ package fdb -// #define FDB_API_VERSION 630 +// #define FDB_API_VERSION 700 // #include import "C" diff --git a/bindings/go/src/fdb/doc.go b/bindings/go/src/fdb/doc.go index 5cfb157ad6..e1759701ff 100644 --- a/bindings/go/src/fdb/doc.go +++ b/bindings/go/src/fdb/doc.go @@ -46,7 +46,7 @@ A basic interaction with the FoundationDB API is demonstrated below: func main() { // Different API versions may expose different runtime behaviors. - fdb.MustAPIVersion(630) + fdb.MustAPIVersion(700) // Open the default database from the system cluster db := fdb.MustOpenDefault() diff --git a/bindings/go/src/fdb/errors.go b/bindings/go/src/fdb/errors.go index 94e699c89e..9c9f75b566 100644 --- a/bindings/go/src/fdb/errors.go +++ b/bindings/go/src/fdb/errors.go @@ -22,7 +22,7 @@ package fdb -// #define FDB_API_VERSION 630 +// #define FDB_API_VERSION 700 // #include import "C" diff --git a/bindings/go/src/fdb/fdb.go b/bindings/go/src/fdb/fdb.go index d0bfd5f699..bc05a05dba 100644 --- a/bindings/go/src/fdb/fdb.go +++ b/bindings/go/src/fdb/fdb.go @@ -22,7 +22,7 @@ package fdb -// #define FDB_API_VERSION 630 +// #define FDB_API_VERSION 700 // #include // #include import "C" @@ -108,7 +108,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 630. +// Currently, this package supports API versions 200 through 700. // // 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 @@ -116,7 +116,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 := 630 + headerVersion := 700 networkMutex.Lock() defer networkMutex.Unlock() @@ -128,7 +128,7 @@ func APIVersion(version int) error { return errAPIVersionAlreadySet } - if version < 200 || version > 630 { + if version < 200 || version > 700 { return errAPIVersionNotSupported } diff --git a/bindings/go/src/fdb/futures.go b/bindings/go/src/fdb/futures.go index 17ae1d70a4..43718fe738 100644 --- a/bindings/go/src/fdb/futures.go +++ b/bindings/go/src/fdb/futures.go @@ -23,7 +23,7 @@ package fdb // #cgo LDFLAGS: -lfdb_c -lm -// #define FDB_API_VERSION 630 +// #define FDB_API_VERSION 700 // #include // #include // diff --git a/bindings/go/src/fdb/range.go b/bindings/go/src/fdb/range.go index 67a45c63b2..584f23cb2b 100644 --- a/bindings/go/src/fdb/range.go +++ b/bindings/go/src/fdb/range.go @@ -22,7 +22,7 @@ package fdb -// #define FDB_API_VERSION 630 +// #define FDB_API_VERSION 700 // #include import "C" diff --git a/bindings/go/src/fdb/transaction.go b/bindings/go/src/fdb/transaction.go index 4102a0556b..6bd198b0da 100644 --- a/bindings/go/src/fdb/transaction.go +++ b/bindings/go/src/fdb/transaction.go @@ -22,7 +22,7 @@ package fdb -// #define FDB_API_VERSION 630 +// #define FDB_API_VERSION 700 // #include import "C" diff --git a/bindings/java/JavaWorkload.cpp b/bindings/java/JavaWorkload.cpp index 808485486b..e47208b6e6 100644 --- a/bindings/java/JavaWorkload.cpp +++ b/bindings/java/JavaWorkload.cpp @@ -19,7 +19,7 @@ */ #include -#define FDB_API_VERSION 630 +#define FDB_API_VERSION 700 #include #include @@ -370,7 +370,7 @@ struct JVM { jmethodID selectMethod = env->GetStaticMethodID(fdbClass, "selectAPIVersion", "(I)Lcom/apple/foundationdb/FDB;"); checkException(); - auto fdbInstance = env->CallStaticObjectMethod(fdbClass, selectMethod, jint(630)); + auto fdbInstance = env->CallStaticObjectMethod(fdbClass, selectMethod, jint(700)); checkException(); env->CallObjectMethod(fdbInstance, getMethod(fdbClass, "disableShutdownHook", "()V")); checkException(); diff --git a/bindings/java/fdbJNI.cpp b/bindings/java/fdbJNI.cpp index 938ac498f3..a127a47864 100644 --- a/bindings/java/fdbJNI.cpp +++ b/bindings/java/fdbJNI.cpp @@ -21,7 +21,7 @@ #include #include -#define FDB_API_VERSION 630 +#define FDB_API_VERSION 700 #include diff --git a/bindings/java/src/main/com/apple/foundationdb/FDB.java b/bindings/java/src/main/com/apple/foundationdb/FDB.java index ba96814cef..b945a5dc69 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 630}.

+ * {@code 700}.

* 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 @@ -181,8 +181,8 @@ public class FDB { } if(version < 510) throw new IllegalArgumentException("API version not supported (minimum 510)"); - if(version > 630) - throw new IllegalArgumentException("API version not supported (maximum 630)"); + if(version > 700) + throw new IllegalArgumentException("API version not supported (maximum 700)"); Select_API_version(version); singleton = new FDB(version); diff --git a/bindings/java/src/main/overview.html.in b/bindings/java/src/main/overview.html.in index fd7c6ac80d..adaedd1a03 100644 --- a/bindings/java/src/main/overview.html.in +++ b/bindings/java/src/main/overview.html.in @@ -13,7 +13,7 @@ and then added 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 versions between {@code 510} and {@code 630}). +API that you want to use (this release of the FoundationDB Java API supports versions between {@code 510} and {@code 700}). 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. @@ -29,7 +29,7 @@ import com.apple.foundationdb.tuple.Tuple; public class Example { public static void main(String[] args) { - FDB fdb = FDB.selectAPIVersion(630); + FDB fdb = FDB.selectAPIVersion(700); 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 3a153e3582..e27e80b082 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 = 630; + public static final int API_VERSION = 700; 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 f21aabeb6a..68f7d74a95 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(630); + FDB fdb = FDB.selectAPIVersion(700); // 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 53f13695c1..bddfd6f57d 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(630).open()) { + try(Database database = FDB.selectAPIVersion(700).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 c43dd71809..9f838d8eeb 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/DirectoryTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/DirectoryTest.java @@ -33,7 +33,7 @@ import com.apple.foundationdb.directory.DirectorySubspace; public class DirectoryTest { public static void main(String[] args) throws Exception { try { - FDB fdb = FDB.selectAPIVersion(630); + FDB fdb = FDB.selectAPIVersion(700); 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 74090eccc0..44e9087b3e 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(630); + FDB fdb = FDB.selectAPIVersion(700); 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 aca9e918d2..ce1f623f4c 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/IterableTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/IterableTest.java @@ -31,7 +31,7 @@ public class IterableTest { public static void main(String[] args) throws InterruptedException { final int reps = 1000; try { - FDB fdb = FDB.selectAPIVersion(630); + FDB fdb = FDB.selectAPIVersion(700); 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 70f688e46a..29abab1471 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(630); + FDB fdb = FDB.selectAPIVersion(700); 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 014f1f038d..624566964a 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(630); + FDB api = FDB.selectAPIVersion(700); 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 3a99c68d56..81365ff44f 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 = 630; + private static final int API_VERSION = 700; 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 f873e954e1..8ad91314c2 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(630); + FDB api = FDB.selectAPIVersion(700); 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 cbcc2d713a..db63999daa 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(630); + FDB api = FDB.selectAPIVersion(700); 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 2aad1eb1bb..df084d564f 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/SerialTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/SerialTest.java @@ -30,7 +30,7 @@ public class SerialTest { public static void main(String[] args) throws InterruptedException { final int reps = 1000; try { - FDB fdb = FDB.selectAPIVersion(630); + FDB fdb = FDB.selectAPIVersion(700); try(Database db = fdb.open()) { runTests(reps, db); } diff --git a/bindings/java/src/test/com/apple/foundationdb/test/SnapshotTransactionTest.java b/bindings/java/src/test/com/apple/foundationdb/test/SnapshotTransactionTest.java index d324463408..78de1ae3db 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/SnapshotTransactionTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/SnapshotTransactionTest.java @@ -39,7 +39,7 @@ public class SnapshotTransactionTest { private static final Subspace SUBSPACE = new Subspace(Tuple.from("test", "conflict_ranges")); public static void main(String[] args) { - FDB fdb = FDB.selectAPIVersion(630); + FDB fdb = FDB.selectAPIVersion(700); try(Database db = fdb.open()) { snapshotReadShouldNotConflict(db); snapshotShouldNotAddConflictRange(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 c7aa190ce7..066cf43383 100644 --- a/bindings/java/src/test/com/apple/foundationdb/test/TupleTest.java +++ b/bindings/java/src/test/com/apple/foundationdb/test/TupleTest.java @@ -50,7 +50,7 @@ public class TupleTest { public static void main(String[] args) throws NoSuchFieldException { final int reps = 1000; try { - FDB fdb = FDB.selectAPIVersion(630); + FDB fdb = FDB.selectAPIVersion(700); addMethods(); comparisons(); emptyTuple(); 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 12bef587d2..e50bc9c031 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(630); + FDB fdb = FDB.selectAPIVersion(700); 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 b204e842e5..14c0aa1d43 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(630); + FDB fdb = FDB.selectAPIVersion(700); try(Database database = fdb.open(args[0])) { database.options().setLocationCacheSize(42); try(Transaction tr = database.createTransaction()) { diff --git a/bindings/python/fdb/__init__.py b/bindings/python/fdb/__init__.py index 0d54c96b5f..c969b6c70c 100644 --- a/bindings/python/fdb/__init__.py +++ b/bindings/python/fdb/__init__.py @@ -52,7 +52,7 @@ def get_api_version(): def api_version(ver): - header_version = 630 + header_version = 700 if '_version' in globals(): if globals()['_version'] != ver: diff --git a/bindings/python/fdb/impl.py b/bindings/python/fdb/impl.py index 3dd5e87077..91bdc2f3a0 100644 --- a/bindings/python/fdb/impl.py +++ b/bindings/python/fdb/impl.py @@ -253,7 +253,7 @@ def transactional(*tr_args, **tr_kwargs): @functools.wraps(func) def wrapper(*args, **kwargs): # We can't throw this from the decorator, as when a user runs - # >>> import fdb ; fdb.api_version(630) + # >>> import fdb ; fdb.api_version(700) # the code above uses @transactional before the API version is set if fdb.get_api_version() >= 630 and inspect.isgeneratorfunction(func): raise ValueError("Generators can not be wrapped with fdb.transactional") diff --git a/bindings/python/tests/size_limit_tests.py b/bindings/python/tests/size_limit_tests.py index 446f787bc1..756d9422e0 100644 --- a/bindings/python/tests/size_limit_tests.py +++ b/bindings/python/tests/size_limit_tests.py @@ -22,7 +22,7 @@ import fdb import sys if __name__ == '__main__': - fdb.api_version(630) + fdb.api_version(700) @fdb.transactional def setValue(tr, key, value): diff --git a/bindings/ruby/lib/fdb.rb b/bindings/ruby/lib/fdb.rb index b1b72d38d7..df8448ea0b 100644 --- a/bindings/ruby/lib/fdb.rb +++ b/bindings/ruby/lib/fdb.rb @@ -36,7 +36,7 @@ module FDB end end def self.api_version(version) - header_version = 630 + header_version = 700 if self.is_api_version_selected?() if @@chosen_version != version raise "FDB API already loaded at version #{@@chosen_version}." diff --git a/build/cmake/package_tester/fdb_c_app/app.c b/build/cmake/package_tester/fdb_c_app/app.c index a15c1193e7..f26b2513c1 100644 --- a/build/cmake/package_tester/fdb_c_app/app.c +++ b/build/cmake/package_tester/fdb_c_app/app.c @@ -1,7 +1,7 @@ -#define FDB_API_VERSION 630 +#define FDB_API_VERSION 700 #include int main(int argc, char* argv[]) { - fdb_select_api_version(630); + fdb_select_api_version(700); return 0; } diff --git a/build/cmake/package_tester/modules/tests.sh b/build/cmake/package_tester/modules/tests.sh index 88709a7953..35ff098a6f 100644 --- a/build/cmake/package_tester/modules/tests.sh +++ b/build/cmake/package_tester/modules/tests.sh @@ -65,7 +65,7 @@ then python setup.py install successOr "Installing python bindings failed" popd - python -c 'import fdb; fdb.api_version(630)' + python -c 'import fdb; fdb.api_version(700)' successOr "Loading python bindings failed" # Test cmake and pkg-config integration: https://github.com/apple/foundationdb/issues/1483 diff --git a/documentation/sphinx/source/api-c.rst b/documentation/sphinx/source/api-c.rst index 5c7cdd2c5d..40482d3b0b 100644 --- a/documentation/sphinx/source/api-c.rst +++ b/documentation/sphinx/source/api-c.rst @@ -133,7 +133,7 @@ API versioning Prior to including ``fdb_c.h``, you must define the ``FDB_API_VERSION`` macro. This, together with the :func:`fdb_select_api_version()` function, allows programs written against an older version of the API to compile and run with newer versions of the C library. The current version of the FoundationDB C API is |api-version|. :: - #define FDB_API_VERSION 630 + #define FDB_API_VERSION 700 #include .. function:: fdb_error_t fdb_select_api_version(int version) diff --git a/documentation/sphinx/source/api-common.rst.inc b/documentation/sphinx/source/api-common.rst.inc index 6bce920a45..6ab190a052 100644 --- a/documentation/sphinx/source/api-common.rst.inc +++ b/documentation/sphinx/source/api-common.rst.inc @@ -147,7 +147,7 @@ .. |atomic-versionstamps-tuple-warning-value| replace:: At this time, versionstamped values are not compatible with the Tuple layer except in Java, Python, and Go. Note that this implies versionstamped values may not be used with the Subspace and Directory layers except in those languages. -.. |api-version| replace:: 630 +.. |api-version| replace:: 700 .. |streaming-mode-blurb1| replace:: When using |get-range-func| and similar interfaces, API clients can request large ranges of the database to iterate over. Making such a request doesn't necessarily mean that the client will consume all of the data in the range - sometimes the client doesn't know how far it intends to iterate in advance. FoundationDB tries to balance latency and bandwidth by requesting data for iteration in batches. diff --git a/documentation/sphinx/source/api-python.rst b/documentation/sphinx/source/api-python.rst index fb75d3516d..69c6dab28a 100644 --- a/documentation/sphinx/source/api-python.rst +++ b/documentation/sphinx/source/api-python.rst @@ -108,7 +108,7 @@ Opening a database After importing the ``fdb`` module and selecting an API version, you probably want to open a :class:`Database` using :func:`open`:: import fdb - fdb.api_version(630) + fdb.api_version(700) db = fdb.open() .. function:: open( cluster_file=None, event_model=None ) diff --git a/documentation/sphinx/source/api-ruby.rst b/documentation/sphinx/source/api-ruby.rst index df73cf6dc4..84078b02d4 100644 --- a/documentation/sphinx/source/api-ruby.rst +++ b/documentation/sphinx/source/api-ruby.rst @@ -93,7 +93,7 @@ Opening a database After requiring the ``FDB`` gem and selecting an API version, you probably want to open a :class:`Database` using :func:`open`:: require 'fdb' - FDB.api_version 630 + FDB.api_version 700 db = FDB.open .. function:: open( cluster_file=nil ) -> Database diff --git a/documentation/sphinx/source/api-version-upgrade-guide.rst b/documentation/sphinx/source/api-version-upgrade-guide.rst index 16fa55100a..12643cc082 100644 --- a/documentation/sphinx/source/api-version-upgrade-guide.rst +++ b/documentation/sphinx/source/api-version-upgrade-guide.rst @@ -9,9 +9,9 @@ This document provides an overview of changes that an application developer may For more details about API versions, see :ref:`api-versions`. -.. _api-version-upgrade-guide-630: +.. _api-version-upgrade-guide-700: -API version 630 +API version 700 =============== General diff --git a/documentation/sphinx/source/class-scheduling-go.rst b/documentation/sphinx/source/class-scheduling-go.rst index d8ea0a5b19..77d9c01e90 100644 --- a/documentation/sphinx/source/class-scheduling-go.rst +++ b/documentation/sphinx/source/class-scheduling-go.rst @@ -29,7 +29,7 @@ Before using the API, we need to specify the API version. This allows programs t .. code-block:: go - fdb.MustAPIVersion(630) + fdb.MustAPIVersion(700) Next, we open a FoundationDB database. The API will connect to the FoundationDB cluster indicated by the :ref:`default cluster file `. @@ -78,7 +78,7 @@ If this is all working, it looks like we are ready to start building a real appl func main() { // Different API versions may expose different runtime behaviors. - fdb.MustAPIVersion(630) + fdb.MustAPIVersion(700) // Open the default database from the system cluster db := fdb.MustOpenDefault() @@ -666,7 +666,7 @@ Here's the code for the scheduling tutorial: } func main() { - fdb.MustAPIVersion(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() db.Options().SetTransactionTimeout(60000) // 60,000 ms = 1 minute db.Options().SetTransactionRetryLimit(100) diff --git a/documentation/sphinx/source/class-scheduling-java.rst b/documentation/sphinx/source/class-scheduling-java.rst index c899c546dc..c5dda17d55 100644 --- a/documentation/sphinx/source/class-scheduling-java.rst +++ b/documentation/sphinx/source/class-scheduling-java.rst @@ -30,7 +30,7 @@ Before using the API, we need to specify the API version. This allows programs t private static final Database db; static { - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); } @@ -66,7 +66,7 @@ If this is all working, it looks like we are ready to start building a real appl private static final Database db; static { - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); } @@ -441,7 +441,7 @@ Here's the code for the scheduling tutorial: private static final Database db; static { - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); db.options().setTransactionTimeout(60000); // 60,000 ms = 1 minute db.options().setTransactionRetryLimit(100); diff --git a/documentation/sphinx/source/class-scheduling-ruby.rst b/documentation/sphinx/source/class-scheduling-ruby.rst index d1f79c3725..c8d8483aad 100644 --- a/documentation/sphinx/source/class-scheduling-ruby.rst +++ b/documentation/sphinx/source/class-scheduling-ruby.rst @@ -23,7 +23,7 @@ Open a Ruby interactive interpreter and import the FoundationDB API module:: Before using the API, we need to specify the API version. This allows programs to maintain compatibility even if the API is modified in future versions:: - > FDB.api_version 630 + > FDB.api_version 700 => nil Next, we open a FoundationDB database. The API will connect to the FoundationDB cluster indicated by the :ref:`default cluster file `. :: @@ -46,7 +46,7 @@ If this is all working, it looks like we are ready to start building a real appl .. code-block:: ruby require 'fdb' - FDB.api_version 630 + FDB.api_version 700 @db = FDB.open @db['hello'] = 'world' print 'hello ', @db['hello'] @@ -373,7 +373,7 @@ Here's the code for the scheduling tutorial: require 'fdb' - FDB.api_version 630 + FDB.api_version 700 #################################### ## Initialization ## diff --git a/documentation/sphinx/source/class-scheduling.rst b/documentation/sphinx/source/class-scheduling.rst index b516bc9f7c..23615a08a6 100644 --- a/documentation/sphinx/source/class-scheduling.rst +++ b/documentation/sphinx/source/class-scheduling.rst @@ -30,7 +30,7 @@ Open a Python interactive interpreter and import the FoundationDB API module:: Before using the API, we need to specify the API version. This allows programs to maintain compatibility even if the API is modified in future versions:: - >>> fdb.api_version(630) + >>> fdb.api_version(700) Next, we open a FoundationDB database. The API will connect to the FoundationDB cluster indicated by the :ref:`default cluster file `. :: @@ -48,7 +48,7 @@ When this command returns without exception, the modification is durably stored If this is all working, it looks like we are ready to start building a real application. For reference, here's the full code for "hello world":: import fdb - fdb.api_version(630) + fdb.api_version(700) db = fdb.open() db[b'hello'] = b'world' print 'hello', db[b'hello'] @@ -91,7 +91,7 @@ FoundationDB includes a few tools that make it easy to model data using this app opening a :ref:`directory ` in the database:: import fdb - fdb.api_version(630) + fdb.api_version(700) db = fdb.open() scheduling = fdb.directory.create_or_open(db, ('scheduling',)) @@ -337,7 +337,7 @@ Here's the code for the scheduling tutorial:: import fdb import fdb.tuple - fdb.api_version(630) + fdb.api_version(700) #################################### diff --git a/documentation/sphinx/source/hierarchical-documents-java.rst b/documentation/sphinx/source/hierarchical-documents-java.rst index c2631e5b36..db33abd4ef 100644 --- a/documentation/sphinx/source/hierarchical-documents-java.rst +++ b/documentation/sphinx/source/hierarchical-documents-java.rst @@ -69,7 +69,7 @@ Here’s a basic implementation of the recipe. private static final long EMPTY_ARRAY = -1; static { - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); docSpace = new Subspace(Tuple.from("D")); } diff --git a/documentation/sphinx/source/multimaps-java.rst b/documentation/sphinx/source/multimaps-java.rst index 4ce8e1f3ba..3c9a46ad3c 100644 --- a/documentation/sphinx/source/multimaps-java.rst +++ b/documentation/sphinx/source/multimaps-java.rst @@ -74,7 +74,7 @@ Here’s a simple implementation of multimaps with multisets as described: private static final int N = 100; static { - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); multi = new Subspace(Tuple.from("M")); } diff --git a/documentation/sphinx/source/priority-queues-java.rst b/documentation/sphinx/source/priority-queues-java.rst index 068349d680..0fafb08b4b 100644 --- a/documentation/sphinx/source/priority-queues-java.rst +++ b/documentation/sphinx/source/priority-queues-java.rst @@ -74,7 +74,7 @@ Here's a basic implementation of the model: private static final Random randno; static{ - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); pq = new Subspace(Tuple.from("P")); diff --git a/documentation/sphinx/source/queues-java.rst b/documentation/sphinx/source/queues-java.rst index 1ed636146d..b4b60df48b 100644 --- a/documentation/sphinx/source/queues-java.rst +++ b/documentation/sphinx/source/queues-java.rst @@ -73,7 +73,7 @@ The following is a simple implementation of the basic pattern: private static final Random randno; static{ - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); queue = new Subspace(Tuple.from("Q")); randno = new Random(); diff --git a/documentation/sphinx/source/release-notes.rst b/documentation/sphinx/source/release-notes.rst index 2297176944..c8ee3f42b5 100644 --- a/documentation/sphinx/source/release-notes.rst +++ b/documentation/sphinx/source/release-notes.rst @@ -67,7 +67,7 @@ Status Bindings -------- -* API version updated to 630. See the :ref:`API version upgrade guide ` for upgrade details. +* API version updated to 700. See the :ref:`API version upgrade guide ` for upgrade details. * Python: The ``@fdb.transactional`` decorator will now throw an error if the decorated function returns a generator. `(PR #1724) `_ * Java: Add caching for various JNI objects to improve performance. `(PR #2809) `_ * Java: Optimize byte array comparisons in ``ByteArrayUtil``. `(PR #2823) `_ diff --git a/documentation/sphinx/source/simple-indexes-java.rst b/documentation/sphinx/source/simple-indexes-java.rst index 709bc4bc7c..c5edf02e71 100644 --- a/documentation/sphinx/source/simple-indexes-java.rst +++ b/documentation/sphinx/source/simple-indexes-java.rst @@ -87,7 +87,7 @@ In this example, we’re storing user data based on user ID but sometimes need t private static final Subspace index; static { - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); main = new Subspace(Tuple.from("user")); index = new Subspace(Tuple.from("zipcode_index")); diff --git a/documentation/sphinx/source/tables-java.rst b/documentation/sphinx/source/tables-java.rst index 0f13cebd65..235dbd5b47 100644 --- a/documentation/sphinx/source/tables-java.rst +++ b/documentation/sphinx/source/tables-java.rst @@ -62,7 +62,7 @@ Here’s a simple implementation of the basic table pattern: private static final Subspace colIndex; static { - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); table = new Subspace(Tuple.from("T")); rowIndex = table.subspace(Tuple.from("R")); diff --git a/documentation/sphinx/source/vector-java.rst b/documentation/sphinx/source/vector-java.rst index 254ca26cc2..17da6ebed8 100644 --- a/documentation/sphinx/source/vector-java.rst +++ b/documentation/sphinx/source/vector-java.rst @@ -77,7 +77,7 @@ Here’s the basic pattern: private static final Subspace vector; static { - fdb = FDB.selectAPIVersion(630); + fdb = FDB.selectAPIVersion(700); db = fdb.open(); vector = new Subspace(Tuple.from("V")); } diff --git a/fdbclient/MultiVersionTransaction.actor.cpp b/fdbclient/MultiVersionTransaction.actor.cpp index bb1ef53260..40c8616d12 100644 --- a/fdbclient/MultiVersionTransaction.actor.cpp +++ b/fdbclient/MultiVersionTransaction.actor.cpp @@ -321,7 +321,7 @@ void DLApi::init() { loadClientFunction(&api->transactionReset, lib, fdbCPath, "fdb_transaction_reset"); loadClientFunction(&api->transactionCancel, lib, fdbCPath, "fdb_transaction_cancel"); loadClientFunction(&api->transactionAddConflictRange, lib, fdbCPath, "fdb_transaction_add_conflict_range"); - loadClientFunction(&api->transactionGetEstimatedRangeSizeBytes, lib, fdbCPath, "fdb_transaction_get_estimated_range_size_bytes", headerVersion >= 630); + loadClientFunction(&api->transactionGetEstimatedRangeSizeBytes, lib, fdbCPath, "fdb_transaction_get_estimated_range_size_bytes", headerVersion >= 700); loadClientFunction(&api->futureGetInt64, lib, fdbCPath, headerVersion >= 620 ? "fdb_future_get_int64" : "fdb_future_get_version"); loadClientFunction(&api->futureGetError, lib, fdbCPath, "fdb_future_get_error"); diff --git a/recipes/go-recipes/blob.go b/recipes/go-recipes/blob.go index d3b9a2b052..2ac8681803 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(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/doc.go b/recipes/go-recipes/doc.go index 418040f84f..5595f3b799 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(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/graph.go b/recipes/go-recipes/graph.go index 371ea9b1a2..966b3e5c5f 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(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/indirect.go b/recipes/go-recipes/indirect.go index 4945b67b50..e354a1af2f 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(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/multi.go b/recipes/go-recipes/multi.go index 4fa06a8622..58cbfd2ba1 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(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/priority.go b/recipes/go-recipes/priority.go index 3ad3762f79..b4f455716a 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(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/queue.go b/recipes/go-recipes/queue.go index 3028e5ff79..6e6c1cee69 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(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() diff --git a/recipes/go-recipes/table.go b/recipes/go-recipes/table.go index 50272df14b..b037699b95 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(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() From 7bcabbe4be9d44b020e828ea2ffd20d2ba336fce Mon Sep 17 00:00:00 2001 From: Balachandar Namasivayam Date: Thu, 28 May 2020 12:21:28 -0700 Subject: [PATCH 2/3] Addressed review comments and update go bindings version. --- bindings/go/src/fdb/fdb_test.go | 12 ++++++------ .../sphinx/source/api-version-upgrade-guide.rst | 4 ++++ documentation/sphinx/source/release-notes.rst | 2 +- fdbclient/MultiVersionTransaction.actor.cpp | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/bindings/go/src/fdb/fdb_test.go b/bindings/go/src/fdb/fdb_test.go index 7bcd588de8..e455dba473 100644 --- a/bindings/go/src/fdb/fdb_test.go +++ b/bindings/go/src/fdb/fdb_test.go @@ -32,7 +32,7 @@ import ( func ExampleOpenDefault() { var e error - e = fdb.APIVersion(630) + e = fdb.APIVersion(700) if e != nil { fmt.Printf("Unable to set API version: %v\n", e) return @@ -52,7 +52,7 @@ func ExampleOpenDefault() { } func TestVersionstamp(t *testing.T) { - fdb.MustAPIVersion(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() setVs := func(t fdb.Transactor, key fdb.Key) (fdb.FutureKey, error) { @@ -98,7 +98,7 @@ func TestVersionstamp(t *testing.T) { } func ExampleTransactor() { - fdb.MustAPIVersion(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() setOne := func(t fdb.Transactor, key fdb.Key, value []byte) error { @@ -149,7 +149,7 @@ func ExampleTransactor() { } func ExampleReadTransactor() { - fdb.MustAPIVersion(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() getOne := func(rt fdb.ReadTransactor, key fdb.Key) ([]byte, error) { @@ -202,7 +202,7 @@ func ExampleReadTransactor() { } func ExamplePrefixRange() { - fdb.MustAPIVersion(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() tr, e := db.CreateTransaction() @@ -241,7 +241,7 @@ func ExamplePrefixRange() { } func ExampleRangeIterator() { - fdb.MustAPIVersion(630) + fdb.MustAPIVersion(700) db := fdb.MustOpenDefault() tr, e := db.CreateTransaction() diff --git a/documentation/sphinx/source/api-version-upgrade-guide.rst b/documentation/sphinx/source/api-version-upgrade-guide.rst index 12643cc082..7c6e298352 100644 --- a/documentation/sphinx/source/api-version-upgrade-guide.rst +++ b/documentation/sphinx/source/api-version-upgrade-guide.rst @@ -14,6 +14,10 @@ For more details about API versions, see :ref:`api-versions`. API version 700 =============== + +API version 630 +=============== + General ------- diff --git a/documentation/sphinx/source/release-notes.rst b/documentation/sphinx/source/release-notes.rst index c8ee3f42b5..2297176944 100644 --- a/documentation/sphinx/source/release-notes.rst +++ b/documentation/sphinx/source/release-notes.rst @@ -67,7 +67,7 @@ Status Bindings -------- -* API version updated to 700. See the :ref:`API version upgrade guide ` for upgrade details. +* API version updated to 630. See the :ref:`API version upgrade guide ` for upgrade details. * Python: The ``@fdb.transactional`` decorator will now throw an error if the decorated function returns a generator. `(PR #1724) `_ * Java: Add caching for various JNI objects to improve performance. `(PR #2809) `_ * Java: Optimize byte array comparisons in ``ByteArrayUtil``. `(PR #2823) `_ diff --git a/fdbclient/MultiVersionTransaction.actor.cpp b/fdbclient/MultiVersionTransaction.actor.cpp index 40c8616d12..bb1ef53260 100644 --- a/fdbclient/MultiVersionTransaction.actor.cpp +++ b/fdbclient/MultiVersionTransaction.actor.cpp @@ -321,7 +321,7 @@ void DLApi::init() { loadClientFunction(&api->transactionReset, lib, fdbCPath, "fdb_transaction_reset"); loadClientFunction(&api->transactionCancel, lib, fdbCPath, "fdb_transaction_cancel"); loadClientFunction(&api->transactionAddConflictRange, lib, fdbCPath, "fdb_transaction_add_conflict_range"); - loadClientFunction(&api->transactionGetEstimatedRangeSizeBytes, lib, fdbCPath, "fdb_transaction_get_estimated_range_size_bytes", headerVersion >= 700); + loadClientFunction(&api->transactionGetEstimatedRangeSizeBytes, lib, fdbCPath, "fdb_transaction_get_estimated_range_size_bytes", headerVersion >= 630); loadClientFunction(&api->futureGetInt64, lib, fdbCPath, headerVersion >= 620 ? "fdb_future_get_int64" : "fdb_future_get_version"); loadClientFunction(&api->futureGetError, lib, fdbCPath, "fdb_future_get_error"); From a8bfd62f834b78987f5d82c580d5b8f44c0792eb Mon Sep 17 00:00:00 2001 From: Balachandar Namasivayam Date: Thu, 28 May 2020 12:32:55 -0700 Subject: [PATCH 3/3] Fix mistake. --- documentation/sphinx/source/api-version-upgrade-guide.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/documentation/sphinx/source/api-version-upgrade-guide.rst b/documentation/sphinx/source/api-version-upgrade-guide.rst index 7c6e298352..16fa55100a 100644 --- a/documentation/sphinx/source/api-version-upgrade-guide.rst +++ b/documentation/sphinx/source/api-version-upgrade-guide.rst @@ -9,11 +9,7 @@ This document provides an overview of changes that an application developer may For more details about API versions, see :ref:`api-versions`. -.. _api-version-upgrade-guide-700: - -API version 700 -=============== - +.. _api-version-upgrade-guide-630: API version 630 ===============