bump API version to 520
This commit is contained in:
parent
ac1f3a20e8
commit
285e1a1ccc
|
@ -25,7 +25,7 @@ sys.path[:0] = [os.path.join(os.path.dirname(__file__), '..', '..', 'bindings',
|
||||||
|
|
||||||
import util
|
import util
|
||||||
|
|
||||||
FDB_API_VERSION = 510
|
FDB_API_VERSION = 520
|
||||||
|
|
||||||
LOGGING = {
|
LOGGING = {
|
||||||
'version': 1,
|
'version': 1,
|
||||||
|
|
|
@ -140,8 +140,9 @@ def choose_api_version(selected_api_version, tester_min_version, tester_max_vers
|
||||||
elif random.random() < 0.7:
|
elif random.random() < 0.7:
|
||||||
api_version = min_version
|
api_version = min_version
|
||||||
elif random.random() < 0.9:
|
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,
|
api_versions = filter(lambda v: v >= min_version and v <= max_version,
|
||||||
440, 450, 460, 500, 510] if 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:
|
else:
|
||||||
api_version = random.randint(min_version, max_version)
|
api_version = random.randint(min_version, max_version)
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
MAX_API_VERSION = 510
|
MAX_API_VERSION = 520
|
||||||
COMMON_TYPES = ['null', 'bytes', 'string', 'int', 'uuid', 'bool', 'float', 'double', 'tuple']
|
COMMON_TYPES = ['null', 'bytes', 'string', 'int', 'uuid', 'bool', 'float', 'double', 'tuple']
|
||||||
ALL_TYPES = COMMON_TYPES + ['versionstamp']
|
ALL_TYPES = COMMON_TYPES + ['versionstamp']
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ fdb.api_version(FDB_API_VERSION)
|
||||||
|
|
||||||
|
|
||||||
class ScriptedTest(Test):
|
class ScriptedTest(Test):
|
||||||
TEST_API_VERSION = 510
|
TEST_API_VERSION = 520
|
||||||
|
|
||||||
def __init__(self, subspace):
|
def __init__(self, subspace):
|
||||||
super(ScriptedTest, self).__init__(subspace, ScriptedTest.TEST_API_VERSION, ScriptedTest.TEST_API_VERSION)
|
super(ScriptedTest, self).__init__(subspace, ScriptedTest.TEST_API_VERSION, ScriptedTest.TEST_API_VERSION)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
|
|
||||||
#include "fdbclient/MultiVersionTransaction.h"
|
#include "fdbclient/MultiVersionTransaction.h"
|
||||||
#include "foundationdb/fdb_c.h"
|
#include "foundationdb/fdb_c.h"
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(FDB_API_VERSION)
|
#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
|
#elif FDB_API_VERSION < 13
|
||||||
#error API version no longer supported (upgrade to 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
|
#error Requested API version requires a newer version of this header
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -602,7 +602,7 @@ void runTests(struct ResultSet *rs) {
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
struct ResultSet *rs = newResultSet();
|
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());
|
printf("Running performance test at client version: %s\n", fdb_get_client_version());
|
||||||
|
|
||||||
valueStr = (uint8_t*)malloc((sizeof(uint8_t))*valueSize);
|
valueStr = (uint8_t*)malloc((sizeof(uint8_t))*valueSize);
|
||||||
|
|
|
@ -243,7 +243,7 @@ void runTests(struct ResultSet *rs) {
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
struct ResultSet *rs = newResultSet();
|
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());
|
printf("Running RYW Benchmark test at client version: %s\n", fdb_get_client_version());
|
||||||
|
|
||||||
keys = generateKeys(numKeys, keySize);
|
keys = generateKeys(numKeys, keySize);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
#ifndef FDB_API_VERSION
|
#ifndef FDB_API_VERSION
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <foundationdb/fdb_c.h>
|
#include <foundationdb/fdb_c.h>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include <flow/flow.h>
|
#include <flow/flow.h>
|
||||||
|
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
#include <bindings/c/foundationdb/fdb_c.h>
|
#include <bindings/c/foundationdb/fdb_c.h>
|
||||||
#undef DLLEXPORT
|
#undef DLLEXPORT
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ This package requires:
|
||||||
- Go 1.1+ with CGO enabled
|
- 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/))
|
- 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:
|
To build this package, in the top level of this repository run:
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
package fdb
|
package fdb
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
#include <foundationdb/fdb_c.h>
|
#include <foundationdb/fdb_c.h>
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
package fdb
|
package fdb
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
#include <foundationdb/fdb_c.h>
|
#include <foundationdb/fdb_c.h>
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
package fdb
|
package fdb
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
#include <foundationdb/fdb_c.h>
|
#include <foundationdb/fdb_c.h>
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
package fdb
|
package fdb
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
#include <foundationdb/fdb_c.h>
|
#include <foundationdb/fdb_c.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
*/
|
*/
|
||||||
|
@ -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
|
// library, an error will be returned. APIVersion must be called prior to any
|
||||||
// other functions in the fdb package.
|
// 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
|
// 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
|
// 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
|
// the API version of your application after upgrading your client until the
|
||||||
// cluster has also been upgraded.
|
// cluster has also been upgraded.
|
||||||
func APIVersion(version int) error {
|
func APIVersion(version int) error {
|
||||||
headerVersion := 510
|
headerVersion := 520
|
||||||
|
|
||||||
networkMutex.Lock()
|
networkMutex.Lock()
|
||||||
defer networkMutex.Unlock()
|
defer networkMutex.Unlock()
|
||||||
|
@ -129,7 +129,7 @@ func APIVersion(version int) error {
|
||||||
return errAPIVersionAlreadySet
|
return errAPIVersionAlreadySet
|
||||||
}
|
}
|
||||||
|
|
||||||
if version < 200 || version > 510 {
|
if version < 200 || version > 520 {
|
||||||
return errAPIVersionNotSupported
|
return errAPIVersionNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ package fdb
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo LDFLAGS: -lfdb_c -lm
|
#cgo LDFLAGS: -lfdb_c -lm
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
#include <foundationdb/fdb_c.h>
|
#include <foundationdb/fdb_c.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
package fdb
|
package fdb
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
#include <foundationdb/fdb_c.h>
|
#include <foundationdb/fdb_c.h>
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
package fdb
|
package fdb
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
#include <foundationdb/fdb_c.h>
|
#include <foundationdb/fdb_c.h>
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
|
|
||||||
#include <foundationdb/fdb_c.h>
|
#include <foundationdb/fdb_c.h>
|
||||||
|
|
||||||
|
|
|
@ -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
|
* 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
|
* 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
|
* with incorrect assumptions from the current version. The API version documented here is version
|
||||||
* {@code 510}.<br><br>
|
* {@code 520}.<br><br>
|
||||||
* FoundationDB encapsulates multiple versions of its interface by requiring
|
* FoundationDB encapsulates multiple versions of its interface by requiring
|
||||||
* the client to explicitly specify the version of the API it uses. The purpose
|
* 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
|
* of this design is to allow you to upgrade the server, client libraries, or
|
||||||
|
@ -150,8 +150,8 @@ public class FDB {
|
||||||
}
|
}
|
||||||
if(version < 510)
|
if(version < 510)
|
||||||
throw new IllegalArgumentException("API version not supported (minimum 510)");
|
throw new IllegalArgumentException("API version not supported (minimum 510)");
|
||||||
if(version > 510)
|
if(version > 520)
|
||||||
throw new IllegalArgumentException("API version not supported (maximum 510)");
|
throw new IllegalArgumentException("API version not supported (maximum 520)");
|
||||||
|
|
||||||
Select_API_version(version);
|
Select_API_version(version);
|
||||||
FDB fdb = new FDB(version);
|
FDB fdb = new FDB(version);
|
||||||
|
|
|
@ -25,7 +25,7 @@ and add it to your classpath.<br>
|
||||||
<h3>Getting started</h3>
|
<h3>Getting started</h3>
|
||||||
To start using FoundationDB from Java, create an instance of the
|
To start using FoundationDB from Java, create an instance of the
|
||||||
{@link com.apple.foundationdb.FDB FoundationDB API interface} with the version 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
|
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.Database Database}s and start using
|
||||||
{@link com.apple.foundationdb.Transaction Transaction}s.
|
{@link com.apple.foundationdb.Transaction Transaction}s.
|
||||||
|
@ -41,7 +41,7 @@ import com.apple.foundationdb.tuple.Tuple;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
FDB fdb = FDB.selectAPIVersion(510);
|
FDB fdb = FDB.selectAPIVersion(520);
|
||||||
|
|
||||||
try(Database db = fdb.open()) {
|
try(Database db = fdb.open()) {
|
||||||
// Run an operation on the database
|
// Run an operation on the database
|
||||||
|
|
|
@ -27,7 +27,7 @@ import com.apple.foundationdb.Database;
|
||||||
import com.apple.foundationdb.FDB;
|
import com.apple.foundationdb.FDB;
|
||||||
|
|
||||||
public abstract class AbstractTester {
|
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 int NUM_RUNS = 25;
|
||||||
protected static final Charset ASCII = Charset.forName("ASCII");
|
protected static final Charset ASCII = Charset.forName("ASCII");
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class BlockingBenchmark {
|
||||||
private static final int PARALLEL = 100;
|
private static final int PARALLEL = 100;
|
||||||
|
|
||||||
public static void main(String[] args) throws InterruptedException {
|
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.
|
// 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.
|
// This is because the database is never really contacted in this test.
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class ConcurrentGetSetGet {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
try(Database database = FDB.selectAPIVersion(510).open()) {
|
try(Database database = FDB.selectAPIVersion(520).open()) {
|
||||||
new ConcurrentGetSetGet().apply(database);
|
new ConcurrentGetSetGet().apply(database);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import com.apple.foundationdb.directory.DirectorySubspace;
|
||||||
public class DirectoryTest {
|
public class DirectoryTest {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
try {
|
try {
|
||||||
FDB fdb = FDB.selectAPIVersion(510);
|
FDB fdb = FDB.selectAPIVersion(520);
|
||||||
try(Database db = fdb.open()) {
|
try(Database db = fdb.open()) {
|
||||||
runTests(db);
|
runTests(db);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ import com.apple.foundationdb.tuple.Tuple;
|
||||||
|
|
||||||
public class Example {
|
public class Example {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
FDB fdb = FDB.selectAPIVersion(510);
|
FDB fdb = FDB.selectAPIVersion(520);
|
||||||
|
|
||||||
try(Database db = fdb.open()) {
|
try(Database db = fdb.open()) {
|
||||||
// Run an operation on the database
|
// Run an operation on the database
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class IterableTest {
|
||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
final int reps = 1000;
|
final int reps = 1000;
|
||||||
try {
|
try {
|
||||||
FDB fdb = FDB.selectAPIVersion(510);
|
FDB fdb = FDB.selectAPIVersion(520);
|
||||||
try(Database db = fdb.open()) {
|
try(Database db = fdb.open()) {
|
||||||
runTests(reps, db);
|
runTests(reps, db);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import com.apple.foundationdb.tuple.ByteArrayUtil;
|
||||||
public class LocalityTests {
|
public class LocalityTests {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
FDB fdb = FDB.selectAPIVersion(510);
|
FDB fdb = FDB.selectAPIVersion(520);
|
||||||
try(Database database = fdb.open(args[0])) {
|
try(Database database = fdb.open(args[0])) {
|
||||||
try(Transaction tr = database.createTransaction()) {
|
try(Transaction tr = database.createTransaction()) {
|
||||||
String[] keyAddresses = LocalityUtil.getAddressesForKey(tr, "a".getBytes()).join();
|
String[] keyAddresses = LocalityUtil.getAddressesForKey(tr, "a".getBytes()).join();
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ParallelRandomScan {
|
||||||
private static final int PARALLELISM_STEP = 5;
|
private static final int PARALLELISM_STEP = 5;
|
||||||
|
|
||||||
public static void main(String[] args) throws InterruptedException {
|
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])) {
|
try(Database database = api.open(args[0])) {
|
||||||
for(int i = PARALLELISM_MIN; i <= PARALLELISM_MAX; i += PARALLELISM_STEP) {
|
for(int i = PARALLELISM_MIN; i <= PARALLELISM_MAX; i += PARALLELISM_STEP) {
|
||||||
runTest(database, i, ROWS, DURATION_MS);
|
runTest(database, i, ROWS, DURATION_MS);
|
||||||
|
|
|
@ -34,7 +34,7 @@ import com.apple.foundationdb.Transaction;
|
||||||
import com.apple.foundationdb.async.AsyncIterable;
|
import com.apple.foundationdb.async.AsyncIterable;
|
||||||
|
|
||||||
public class RangeTest {
|
public class RangeTest {
|
||||||
private static final int API_VERSION = 510;
|
private static final int API_VERSION = 520;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("About to use version " + API_VERSION);
|
System.out.println("About to use version " + API_VERSION);
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class SerialInsertion {
|
||||||
private static final int NODES = 1000000;
|
private static final int NODES = 1000000;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
FDB api = FDB.selectAPIVersion(510);
|
FDB api = FDB.selectAPIVersion(520);
|
||||||
try(Database database = api.open()) {
|
try(Database database = api.open()) {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class SerialIteration {
|
||||||
private static final int THREAD_COUNT = 1;
|
private static final int THREAD_COUNT = 1;
|
||||||
|
|
||||||
public static void main(String[] args) throws InterruptedException {
|
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])) {
|
try(Database database = api.open(args[0])) {
|
||||||
for(int i = 1; i <= THREAD_COUNT; i++) {
|
for(int i = 1; i <= THREAD_COUNT; i++) {
|
||||||
runThreadedTest(database, i);
|
runThreadedTest(database, i);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class SerialTest {
|
||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
final int reps = 1000;
|
final int reps = 1000;
|
||||||
try {
|
try {
|
||||||
FDB fdb = FDB.selectAPIVersion(510);
|
FDB fdb = FDB.selectAPIVersion(520);
|
||||||
try(Database db = fdb.open()) {
|
try(Database db = fdb.open()) {
|
||||||
runTests(reps, db);
|
runTests(reps, db);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class TupleTest {
|
||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
final int reps = 1000;
|
final int reps = 1000;
|
||||||
try {
|
try {
|
||||||
FDB fdb = FDB.selectAPIVersion(510);
|
FDB fdb = FDB.selectAPIVersion(520);
|
||||||
try(Database db = fdb.open()) {
|
try(Database db = fdb.open()) {
|
||||||
runTests(reps, db);
|
runTests(reps, db);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ import com.apple.foundationdb.tuple.Versionstamp;
|
||||||
|
|
||||||
public class VersionstampSmokeTest {
|
public class VersionstampSmokeTest {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
FDB fdb = FDB.selectAPIVersion(510);
|
FDB fdb = FDB.selectAPIVersion(520);
|
||||||
try(Database db = fdb.open()) {
|
try(Database db = fdb.open()) {
|
||||||
db.run(tr -> {
|
db.run(tr -> {
|
||||||
tr.clear(Tuple.from("prefix").range());
|
tr.clear(Tuple.from("prefix").range());
|
||||||
|
|
|
@ -34,7 +34,7 @@ import com.apple.foundationdb.Transaction;
|
||||||
public class WatchTest {
|
public class WatchTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
FDB fdb = FDB.selectAPIVersion(510);
|
FDB fdb = FDB.selectAPIVersion(520);
|
||||||
try(Database database = fdb.open(args[0])) {
|
try(Database database = fdb.open(args[0])) {
|
||||||
database.options().setLocationCacheSize(42);
|
database.options().setLocationCacheSize(42);
|
||||||
try(Transaction tr = database.createTransaction()) {
|
try(Transaction tr = database.createTransaction()) {
|
||||||
|
|
|
@ -43,8 +43,8 @@ module.exports = {
|
||||||
throw new Error('Cannot select multiple different FDB API versions');
|
throw new Error('Cannot select multiple different FDB API versions');
|
||||||
if(version < 500)
|
if(version < 500)
|
||||||
throw new RangeError('FDB API versions before 500 are not supported');
|
throw new RangeError('FDB API versions before 500 are not supported');
|
||||||
if(version > 510)
|
if(version > 520)
|
||||||
throw new RangeError('Latest known FDB API version is 510');
|
throw new RangeError('Latest known FDB API version is 520');
|
||||||
|
|
||||||
if(!selectedApiVersion.value) {
|
if(!selectedApiVersion.value) {
|
||||||
fdb.apiVersion(version);
|
fdb.apiVersion(version);
|
||||||
|
|
|
@ -22,6 +22,6 @@
|
||||||
#ifndef FDB_NODE_VERSION_H
|
#ifndef FDB_NODE_VERSION_H
|
||||||
#define FDB_NODE_VERSION_H
|
#define FDB_NODE_VERSION_H
|
||||||
|
|
||||||
#define FDB_API_VERSION 510
|
#define FDB_API_VERSION 520
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* limitations under the License.
|
* 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');
|
var fdbModule = require('../lib/fdbModule.js');
|
||||||
|
|
||||||
console.log(fdb.tuple.pack([-Math.pow(2,53)]));
|
console.log(fdb.tuple.pack([-Math.pow(2,53)]));
|
||||||
|
|
|
@ -41,7 +41,7 @@ def _add_symbols(module, symbols):
|
||||||
|
|
||||||
|
|
||||||
def api_version(ver):
|
def api_version(ver):
|
||||||
header_version = 510
|
header_version = 520
|
||||||
|
|
||||||
if '_version' in globals():
|
if '_version' in globals():
|
||||||
if globals()['_version'] != ver:
|
if globals()['_version'] != ver:
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
module FDB
|
module FDB
|
||||||
@@chosen_version = -1
|
@@chosen_version = -1
|
||||||
def self.api_version(version)
|
def self.api_version(version)
|
||||||
header_version = 510
|
header_version = 520
|
||||||
if @@chosen_version >= 0
|
if @@chosen_version >= 0
|
||||||
if@@chosen_version != version
|
if@@chosen_version != version
|
||||||
raise "FDB API already loaded at version #{@@chosen_version}."
|
raise "FDB API already loaded at version #{@@chosen_version}."
|
||||||
|
|
|
@ -78,7 +78,7 @@ func read_blob(t fdb.ReadTransactor, blob_subspace subspace.Subspace) ([]byte, e
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fdb.MustAPIVersion(510)
|
fdb.MustAPIVersion(520)
|
||||||
|
|
||||||
db := fdb.MustOpenDefault()
|
db := fdb.MustOpenDefault()
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ func (doc Doc) GetDoc(trtr fdb.Transactor, doc_id int) interface{} {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fdb.MustAPIVersion(510)
|
fdb.MustAPIVersion(520)
|
||||||
|
|
||||||
db := fdb.MustOpenDefault()
|
db := fdb.MustOpenDefault()
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ func (graph *Graph) get_in_neighbors(trtr fdb.Transactor, node int) ([]int, erro
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fdb.MustAPIVersion(510)
|
fdb.MustAPIVersion(520)
|
||||||
|
|
||||||
db := fdb.MustOpenDefault()
|
db := fdb.MustOpenDefault()
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ func (wrkspc Workspace) Session(foo func(directory.DirectorySubspace)) (err erro
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fdb.MustAPIVersion(510)
|
fdb.MustAPIVersion(520)
|
||||||
|
|
||||||
db := fdb.MustOpenDefault()
|
db := fdb.MustOpenDefault()
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ func (multi MultiMap) MultiIsElement(trtr fdb.Transactor, index, value interface
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
fdb.MustAPIVersion(510)
|
fdb.MustAPIVersion(520)
|
||||||
|
|
||||||
db := fdb.MustOpenDefault()
|
db := fdb.MustOpenDefault()
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ func (prty Priority) Peek(trtr fdb.Transactor, max bool) interface{} {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fdb.MustAPIVersion(510)
|
fdb.MustAPIVersion(520)
|
||||||
|
|
||||||
db := fdb.MustOpenDefault()
|
db := fdb.MustOpenDefault()
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ func (q *Queue) FirstItem(trtr fdb.Transactor) (interface{}, error) {
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Println("Queue Example Program")
|
fmt.Println("Queue Example Program")
|
||||||
|
|
||||||
fdb.MustAPIVersion(510)
|
fdb.MustAPIVersion(520)
|
||||||
|
|
||||||
db := fdb.MustOpenDefault()
|
db := fdb.MustOpenDefault()
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ func (tbl Table) TableGetCol(tr fdb.ReadTransactor, col int) ([]interface{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fdb.MustAPIVersion(510)
|
fdb.MustAPIVersion(520)
|
||||||
|
|
||||||
db := fdb.MustOpenDefault()
|
db := fdb.MustOpenDefault()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue