Skip to content

Commit

Permalink
Update api version to 700
Browse files Browse the repository at this point in the history
  • Loading branch information
bnamasivayam committed May 28, 2020
1 parent e690828 commit a167bf3
Show file tree
Hide file tree
Showing 76 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion bindings/bindingtester/__init__.py
Expand Up @@ -26,7 +26,7 @@

import util

FDB_API_VERSION = 630
FDB_API_VERSION = 700

LOGGING = {
'version': 1,
Expand Down
2 changes: 1 addition & 1 deletion bindings/bindingtester/bindingtester.py
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion bindings/bindingtester/known_testers.py
Expand Up @@ -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']

Expand Down
2 changes: 1 addition & 1 deletion bindings/bindingtester/tests/scripted.py
Expand Up @@ -34,7 +34,7 @@


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)
Expand Down
2 changes: 1 addition & 1 deletion bindings/c/fdb_c.cpp
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions bindings/c/foundationdb/fdb_c.h
Expand Up @@ -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

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion bindings/c/test/mako/mako.h
Expand Up @@ -3,7 +3,7 @@
#pragma once

#ifndef FDB_API_VERSION
#define FDB_API_VERSION 630
#define FDB_API_VERSION 700
#endif

#include <foundationdb/fdb_c.h>
Expand Down
2 changes: 1 addition & 1 deletion bindings/c/test/performance_test.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion bindings/c/test/ryw_benchmark.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion bindings/c/test/test.h
Expand Up @@ -29,7 +29,7 @@
#include <inttypes.h>

#ifndef FDB_API_VERSION
#define FDB_API_VERSION 630
#define FDB_API_VERSION 700
#endif

#include <foundationdb/fdb_c.h>
Expand Down
2 changes: 1 addition & 1 deletion bindings/c/test/txn_size_test.c
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions bindings/c/test/workloads/SimpleWorkload.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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)) } });
Expand Down
4 changes: 2 additions & 2 deletions bindings/flow/fdb_flow.actor.cpp
Expand Up @@ -36,7 +36,7 @@ THREAD_FUNC networkThread(void* fdb) {
}

ACTOR Future<Void> _test() {
API *fdb = FDB::API::selectAPIVersion(630);
API *fdb = FDB::API::selectAPIVersion(700);
auto db = fdb->createDatabase();
state Reference<Transaction> tr = db->createTransaction();

Expand Down Expand Up @@ -79,7 +79,7 @@ ACTOR Future<Void> _test() {
}

void fdb_flow_test() {
API *fdb = FDB::API::selectAPIVersion(630);
API *fdb = FDB::API::selectAPIVersion(700);
fdb->setupNetwork();
startThread(networkThread, fdb);

Expand Down
2 changes: 1 addition & 1 deletion bindings/flow/fdb_flow.h
Expand Up @@ -23,7 +23,7 @@

#include <flow/flow.h>

#define FDB_API_VERSION 630
#define FDB_API_VERSION 700
#include <bindings/c/foundationdb/fdb_c.h>
#undef DLLEXPORT

Expand Down
2 changes: 1 addition & 1 deletion bindings/flow/tester/Tester.actor.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion bindings/go/README.md
Expand Up @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion bindings/go/src/fdb/cluster.go
Expand Up @@ -22,7 +22,7 @@

package fdb

// #define FDB_API_VERSION 630
// #define FDB_API_VERSION 700
// #include <foundationdb/fdb_c.h>
import "C"

Expand Down
2 changes: 1 addition & 1 deletion bindings/go/src/fdb/database.go
Expand Up @@ -22,7 +22,7 @@

package fdb

// #define FDB_API_VERSION 630
// #define FDB_API_VERSION 700
// #include <foundationdb/fdb_c.h>
import "C"

Expand Down
2 changes: 1 addition & 1 deletion bindings/go/src/fdb/doc.go
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion bindings/go/src/fdb/errors.go
Expand Up @@ -22,7 +22,7 @@

package fdb

// #define FDB_API_VERSION 630
// #define FDB_API_VERSION 700
// #include <foundationdb/fdb_c.h>
import "C"

Expand Down
8 changes: 4 additions & 4 deletions bindings/go/src/fdb/fdb.go
Expand Up @@ -22,7 +22,7 @@

package fdb

// #define FDB_API_VERSION 630
// #define FDB_API_VERSION 700
// #include <foundationdb/fdb_c.h>
// #include <stdlib.h>
import "C"
Expand Down Expand Up @@ -108,15 +108,15 @@ 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
// being used to connect to the cluster. In particular, you should not advance
// 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()
Expand All @@ -128,7 +128,7 @@ func APIVersion(version int) error {
return errAPIVersionAlreadySet
}

if version < 200 || version > 630 {
if version < 200 || version > 700 {
return errAPIVersionNotSupported
}

Expand Down
2 changes: 1 addition & 1 deletion bindings/go/src/fdb/futures.go
Expand Up @@ -23,7 +23,7 @@
package fdb

// #cgo LDFLAGS: -lfdb_c -lm
// #define FDB_API_VERSION 630
// #define FDB_API_VERSION 700
// #include <foundationdb/fdb_c.h>
// #include <string.h>
//
Expand Down
2 changes: 1 addition & 1 deletion bindings/go/src/fdb/range.go
Expand Up @@ -22,7 +22,7 @@

package fdb

// #define FDB_API_VERSION 630
// #define FDB_API_VERSION 700
// #include <foundationdb/fdb_c.h>
import "C"

Expand Down
2 changes: 1 addition & 1 deletion bindings/go/src/fdb/transaction.go
Expand Up @@ -22,7 +22,7 @@

package fdb

// #define FDB_API_VERSION 630
// #define FDB_API_VERSION 700
// #include <foundationdb/fdb_c.h>
import "C"

Expand Down
4 changes: 2 additions & 2 deletions bindings/java/JavaWorkload.cpp
Expand Up @@ -19,7 +19,7 @@
*/

#include <foundationdb/ClientWorkload.h>
#define FDB_API_VERSION 630
#define FDB_API_VERSION 700
#include <foundationdb/fdb_c.h>

#include <jni.h>
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion bindings/java/fdbJNI.cpp
Expand Up @@ -21,7 +21,7 @@
#include <jni.h>
#include <string.h>

#define FDB_API_VERSION 630
#define FDB_API_VERSION 700

#include <foundationdb/fdb_c.h>

Expand Down
6 changes: 3 additions & 3 deletions bindings/java/src/main/com/apple/foundationdb/FDB.java
Expand Up @@ -35,7 +35,7 @@
* 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}.<br><br>
* {@code 700}.<br><br>
* 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
Expand Down Expand Up @@ -181,8 +181,8 @@ public static FDB selectAPIVersion(final int version) throws FDBException {
}
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);
Expand Down
4 changes: 2 additions & 2 deletions bindings/java/src/main/overview.html.in
Expand Up @@ -13,7 +13,7 @@ and then added to your classpath.<br>
<h1>Getting started</h1>
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.
Expand All @@ -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
Expand Down
Expand Up @@ -27,7 +27,7 @@
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");

Expand Down
Expand Up @@ -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.
Expand Down
Expand Up @@ -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);
}
}
Expand Down
Expand Up @@ -33,7 +33,7 @@
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);
}
Expand Down
Expand Up @@ -26,7 +26,7 @@

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
Expand Down
Expand Up @@ -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);
}
Expand Down

0 comments on commit a167bf3

Please sign in to comment.