mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 01:42:37 +08:00
Update API_VERSION from 500 to 510
This commit is contained in:
parent
eeebf10030
commit
8e0bea2795
@ -25,7 +25,7 @@ sys.path[:0]=[os.path.join(os.path.dirname(__file__), '..', '..', 'bindings', 'p
|
||||
|
||||
import util
|
||||
|
||||
FDB_API_VERSION = 500
|
||||
FDB_API_VERSION = 510
|
||||
|
||||
LOGGING = {
|
||||
'version' : 1,
|
||||
|
@ -133,7 +133,7 @@ def choose_api_version(selected_api_version, tester_min_version, tester_max_vers
|
||||
elif random.random() < 0.7:
|
||||
api_version = min_version
|
||||
elif random.random() < 0.9:
|
||||
api_version = random.choice([v for v in [13, 14, 16, 21, 22, 23, 100, 200, 300, 400, 410, 420, 430, 440, 450, 460, 500] if v >= min_version and v <= max_version])
|
||||
api_version = random.choice([v for v in [13, 14, 16, 21, 22, 23, 100, 200, 300, 400, 410, 420, 430, 440, 450, 460, 500, 510] if v >= min_version and v <= max_version])
|
||||
else:
|
||||
api_version = random.randint(min_version, max_version)
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
import os
|
||||
|
||||
MAX_API_VERSION = 500
|
||||
MAX_API_VERSION = 510
|
||||
|
||||
class Tester:
|
||||
def __init__(self, name, cmd, max_int_bits=64, min_api_version=0, max_api_version=MAX_API_VERSION, threads_enabled=True):
|
||||
|
@ -32,7 +32,7 @@ fdb.api_version(FDB_API_VERSION)
|
||||
|
||||
# SOMEDAY: This should probably be broken up into smaller tests
|
||||
class ScriptedTest(Test):
|
||||
TEST_API_VERSION = 500
|
||||
TEST_API_VERSION = 510
|
||||
|
||||
def __init__(self, subspace):
|
||||
super(ScriptedTest, self).__init__(subspace, ScriptedTest.TEST_API_VERSION, ScriptedTest.TEST_API_VERSION)
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
|
||||
#include "fdbclient/MultiVersionTransaction.h"
|
||||
#include "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 500)
|
||||
#error You must #define FDB_API_VERSION prior to including fdb_c.h (current version is 510)
|
||||
#elif FDB_API_VERSION < 13
|
||||
#error API version no longer supported (upgrade to 13)
|
||||
#elif FDB_API_VERSION > 500
|
||||
#elif FDB_API_VERSION > 510
|
||||
#error Requested API version requires a newer version of this header
|
||||
#endif
|
||||
|
||||
|
@ -602,7 +602,7 @@ void runTests(struct ResultSet *rs) {
|
||||
int main(int argc, char **argv) {
|
||||
srand(time(NULL));
|
||||
struct ResultSet *rs = newResultSet();
|
||||
checkError(fdb_select_api_version(500), "select API version", rs);
|
||||
checkError(fdb_select_api_version(510), "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);
|
||||
|
@ -243,7 +243,7 @@ void runTests(struct ResultSet *rs) {
|
||||
int main(int argc, char **argv) {
|
||||
srand(time(NULL));
|
||||
struct ResultSet *rs = newResultSet();
|
||||
checkError(fdb_select_api_version(500), "select API version", rs);
|
||||
checkError(fdb_select_api_version(510), "select API version", rs);
|
||||
printf("Running RYW Benchmark test at client version: %s\n", fdb_get_client_version());
|
||||
|
||||
keys = generateKeys(numKeys, keySize);
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef FDB_API_VERSION
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
#endif
|
||||
|
||||
#include <foundationdb/fdb_c.h>
|
||||
|
@ -33,7 +33,7 @@ THREAD_FUNC networkThread(void* fdb) {
|
||||
}
|
||||
|
||||
ACTOR Future<Void> _test() {
|
||||
API *fdb = FDB::API::selectAPIVersion(500);
|
||||
API *fdb = FDB::API::selectAPIVersion(510);
|
||||
auto c = fdb->createCluster( std::string() );
|
||||
auto db = c->createDatabase();
|
||||
state Reference<Transaction> tr( new Transaction(db) );
|
||||
@ -77,7 +77,7 @@ ACTOR Future<Void> _test() {
|
||||
}
|
||||
|
||||
void fdb_flow_test() {
|
||||
API *fdb = FDB::API::selectAPIVersion(500);
|
||||
API *fdb = FDB::API::selectAPIVersion(510);
|
||||
fdb->setupNetwork();
|
||||
startThread(networkThread, fdb);
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include <flow/flow.h>
|
||||
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
#include <bindings/c/foundationdb/fdb_c.h>
|
||||
#undef DLLEXPORT
|
||||
|
||||
|
@ -1687,7 +1687,7 @@ ACTOR void _test_versionstamp() {
|
||||
try {
|
||||
g_network = newNet2(NetworkAddress(), false);
|
||||
|
||||
API *fdb = FDB::API::selectAPIVersion(500);
|
||||
API *fdb = FDB::API::selectAPIVersion(510);
|
||||
|
||||
fdb->setupNetwork();
|
||||
startThread(networkThread, fdb);
|
||||
|
@ -8,7 +8,7 @@ This package requires:
|
||||
- Go 1.1+ with CGO enabled
|
||||
- FoundationDB C API 2.0.x, 3.0.x, or 4.x.y (part of the [FoundationDB clients package](https://files.foundationdb.org/fdb-c/))
|
||||
|
||||
Use of this package requires the selection of a FoundationDB API version at runtime. This package currently supports FoundationDB API versions 200-500.
|
||||
Use of this package requires the selection of a FoundationDB API version at runtime. This package currently supports FoundationDB API versions 200-510.
|
||||
|
||||
To build this package, in the top level of this repository run:
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
package fdb
|
||||
|
||||
/*
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
#include <foundationdb/fdb_c.h>
|
||||
*/
|
||||
import "C"
|
||||
|
@ -23,7 +23,7 @@
|
||||
package fdb
|
||||
|
||||
/*
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
#include <foundationdb/fdb_c.h>
|
||||
*/
|
||||
import "C"
|
||||
|
@ -23,7 +23,7 @@
|
||||
package fdb
|
||||
|
||||
/*
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
#include <foundationdb/fdb_c.h>
|
||||
*/
|
||||
import "C"
|
||||
|
@ -23,7 +23,7 @@
|
||||
package fdb
|
||||
|
||||
/*
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
#include <foundationdb/fdb_c.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
|
||||
// other functions in the fdb package.
|
||||
//
|
||||
// Currently, this package supports API versions 200 through 500.
|
||||
// Currently, this package supports API versions 200 through 510.
|
||||
//
|
||||
// Warning: When using the multi-version client API, setting an API version that
|
||||
// is not supported by a particular client library will prevent that client from
|
||||
@ -117,7 +117,7 @@ func (opt NetworkOptions) setOpt(code int, param []byte) error {
|
||||
// the API version of your application after upgrading your client until the
|
||||
// cluster has also been upgraded.
|
||||
func APIVersion(version int) error {
|
||||
headerVersion := 500
|
||||
headerVersion := 510
|
||||
|
||||
networkMutex.Lock()
|
||||
defer networkMutex.Unlock()
|
||||
@ -129,7 +129,7 @@ func APIVersion(version int) error {
|
||||
return errAPIVersionAlreadySet
|
||||
}
|
||||
|
||||
if version < 200 || version > 500 {
|
||||
if version < 200 || version > 510 {
|
||||
return errAPIVersionNotSupported
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ package fdb
|
||||
|
||||
/*
|
||||
#cgo LDFLAGS: -lfdb_c -lm
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
#include <foundationdb/fdb_c.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
package fdb
|
||||
|
||||
/*
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
#include <foundationdb/fdb_c.h>
|
||||
*/
|
||||
import "C"
|
||||
|
@ -23,7 +23,7 @@
|
||||
package fdb
|
||||
|
||||
/*
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
#include <foundationdb/fdb_c.h>
|
||||
*/
|
||||
import "C"
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <jni.h>
|
||||
#include <string.h>
|
||||
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
|
||||
#include <foundationdb/fdb_c.h>
|
||||
|
||||
|
@ -34,7 +34,7 @@ import java.util.concurrent.ThreadFactory;
|
||||
* 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 500}.<br><br>
|
||||
* {@code 510}.<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
|
||||
@ -157,8 +157,8 @@ public class FDB {
|
||||
}
|
||||
if(version < 500)
|
||||
throw new IllegalArgumentException("API version not supported (minimum 500)");
|
||||
if(version > 500)
|
||||
throw new IllegalArgumentException("API version not supported (maximum 500)");
|
||||
if(version > 510)
|
||||
throw new IllegalArgumentException("API version not supported (maximum 510)");
|
||||
Select_API_version(version);
|
||||
return singleton = new FDB(version);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ and add it to your classpath.<br>
|
||||
<h3>Getting started</h3>
|
||||
To start using FoundationDB from Java, create an instance of the
|
||||
{@link com.apple.cie.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 500}).
|
||||
API that you want to use (this release of the FoundationDB Java API supports only version {@code 510}).
|
||||
With this API object you can then open {@link com.apple.cie.foundationdb.Cluster Cluster}s and
|
||||
{@link com.apple.cie.foundationdb.Database Database}s and start using
|
||||
{@link com.apple.cie.foundationdb.Transaction Transactions}s.
|
||||
@ -41,7 +41,7 @@ import Tuple;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database db = fdb.open();
|
||||
|
||||
// Run an operation on the database
|
||||
|
@ -27,7 +27,7 @@ import java.nio.charset.Charset;
|
||||
import java.util.Random;
|
||||
|
||||
public abstract class AbstractTester {
|
||||
public static final int API_VERSION = 500;
|
||||
public static final int API_VERSION = 510;
|
||||
protected static final int NUM_RUNS = 25;
|
||||
protected static final Charset ASCII = Charset.forName("ASCII");
|
||||
|
||||
|
@ -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(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
|
||||
// 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.
|
||||
|
@ -51,7 +51,7 @@ public class ConcurrentGetSetGet {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Database database = FDB.selectAPIVersion(500).open();
|
||||
Database database = FDB.selectAPIVersion(510).open();
|
||||
new ConcurrentGetSetGet().apply(database);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class DirectoryTest {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
Cluster c = FDB.selectAPIVersion(500).createCluster(CLUSTER_FILE);
|
||||
Cluster c = FDB.selectAPIVersion(510).createCluster(CLUSTER_FILE);
|
||||
Database db = c.openDatabase();
|
||||
runTests(db);
|
||||
} catch(Throwable t) {
|
||||
|
@ -30,7 +30,7 @@ import com.apple.cie.foundationdb.tuple.Tuple;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) throws ExecutionException, InterruptedException {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database db = fdb.open();
|
||||
|
||||
// Run an operation on the database
|
||||
|
@ -36,7 +36,7 @@ public class IterableTest {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
final int reps = 1000;
|
||||
try {
|
||||
Cluster cluster = FDB.selectAPIVersion(500).createCluster(CLUSTER_FILE);
|
||||
Cluster cluster = FDB.selectAPIVersion(510).createCluster(CLUSTER_FILE);
|
||||
Database db = cluster.openDatabase();
|
||||
runTests(reps, db);
|
||||
} catch(Throwable t) {
|
||||
|
@ -34,7 +34,7 @@ import com.apple.cie.foundationdb.tuple.ByteArrayUtil;
|
||||
public class LocalityTests {
|
||||
|
||||
public static void main(String[] args) {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database database = fdb.open(args[0]);
|
||||
{
|
||||
Transaction tr = database.createTransaction();
|
||||
|
@ -45,7 +45,7 @@ public class ParallelRandomScan {
|
||||
private static final int PARALLELISM_STEP = 5;
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
FDB api = FDB.selectAPIVersion(500);
|
||||
FDB api = FDB.selectAPIVersion(510);
|
||||
Database database = api.open(args[0]);
|
||||
|
||||
for(int i = PARALLELISM_MIN; i <= PARALLELISM_MAX; i += PARALLELISM_STEP) {
|
||||
|
@ -34,7 +34,7 @@ import com.apple.cie.foundationdb.Transaction;
|
||||
import com.apple.cie.foundationdb.async.AsyncIterable;
|
||||
|
||||
public class RangeTest {
|
||||
private static final int API_VERSION = 500;
|
||||
private static final int API_VERSION = 510;
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("About to use version " + API_VERSION);
|
||||
|
@ -34,7 +34,7 @@ public class SerialInsertion {
|
||||
private static final int NODES = 1000000;
|
||||
|
||||
public static void main(String[] args) {
|
||||
FDB api = FDB.selectAPIVersion(500);
|
||||
FDB api = FDB.selectAPIVersion(510);
|
||||
Database database = api.open("T:\\circus\\tags\\RebarCluster-bbc\\cluster_id.txt");
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
|
@ -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(500);
|
||||
FDB api = FDB.selectAPIVersion(510);
|
||||
Database database = api.open(args[0]);
|
||||
|
||||
for(int i = 1; i <= THREAD_COUNT; i++) {
|
||||
|
@ -36,7 +36,7 @@ public class SerialTest {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
final int reps = 1000;
|
||||
try {
|
||||
Cluster c = FDB.selectAPIVersion(500).createCluster(CLUSTER_FILE);
|
||||
Cluster c = FDB.selectAPIVersion(510).createCluster(CLUSTER_FILE);
|
||||
Database db = c.openDatabase();
|
||||
runTests(reps, db);
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class TupleTest {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
final int reps = 1000;
|
||||
try {
|
||||
Cluster c = FDB.selectAPIVersion(500).createCluster(CLUSTER_FILE);
|
||||
Cluster c = FDB.selectAPIVersion(510).createCluster(CLUSTER_FILE);
|
||||
Database db = c.openDatabase();
|
||||
runTests(reps, db);
|
||||
} catch(Throwable t) {
|
||||
|
@ -34,7 +34,7 @@ import com.apple.cie.foundationdb.Transaction;
|
||||
public class WatchTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database database = fdb.open(args[0]);
|
||||
database.options().setLocationCacheSize(42);
|
||||
Transaction tr = database.createTransaction();
|
||||
|
@ -34,7 +34,7 @@ import java.util.concurrent.ThreadFactory;
|
||||
* 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 500}.<br><br>
|
||||
* {@code 510}.<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
|
||||
@ -157,8 +157,8 @@ public class FDB {
|
||||
}
|
||||
if(version < 500)
|
||||
throw new IllegalArgumentException("API version not supported (minimum 500)");
|
||||
if(version > 500)
|
||||
throw new IllegalArgumentException("API version not supported (maximum 500)");
|
||||
if(version > 510)
|
||||
throw new IllegalArgumentException("API version not supported (maximum 510)");
|
||||
Select_API_version(version);
|
||||
return singleton = new FDB(version);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ and add it to your classpath.<br>
|
||||
<h3>Getting started</h3>
|
||||
To start using FoundationDB from Java, create an instance of the
|
||||
{@link com.apple.cie.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 500}).
|
||||
API that you want to use (this release of the FoundationDB Java API supports only version {@code 510}).
|
||||
With this API object you can then open {@link com.apple.cie.foundationdb.Cluster}s and
|
||||
{@link com.apple.cie.foundationdb.Database}s and start using
|
||||
{@link com.apple.cie.foundationdb.Transaction}s. Here we give an example. The example relies on a
|
||||
@ -41,7 +41,7 @@ import Tuple;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database db = fdb.open();
|
||||
|
||||
// Run an operation on the database
|
||||
|
@ -37,7 +37,7 @@ public class AsListTest {
|
||||
* a bug made the the addition of the clear into the result returning 0 items.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database database = fdb.open("T:\\circus\\tags\\RebarCluster-bbc\\cluster_id.txt");
|
||||
database.options().setLocationCacheSize(42);
|
||||
Transaction tr = database.createTransaction();
|
||||
|
@ -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(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
|
||||
// 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.
|
||||
|
@ -52,7 +52,7 @@ public class ConcurrentGetSetGet {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Database database = FDB.selectAPIVersion(500).open();
|
||||
Database database = FDB.selectAPIVersion(510).open();
|
||||
new ConcurrentGetSetGet().apply(database);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class DirectoryTest {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
Cluster c = FDB.selectAPIVersion(500).createCluster(CLUSTER_FILE);
|
||||
Cluster c = FDB.selectAPIVersion(510).createCluster(CLUSTER_FILE);
|
||||
Database db = c.openDatabase();
|
||||
runTests(db);
|
||||
} catch(Throwable t) {
|
||||
|
@ -29,7 +29,7 @@ import com.apple.cie.foundationdb.tuple.Tuple;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database db = fdb.open();
|
||||
|
||||
// Run an operation on the database
|
||||
|
@ -36,7 +36,7 @@ public class IterableTest {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
final int reps = 1000;
|
||||
try {
|
||||
Cluster cluster = FDB.selectAPIVersion(500).createCluster(CLUSTER_FILE);
|
||||
Cluster cluster = FDB.selectAPIVersion(510).createCluster(CLUSTER_FILE);
|
||||
Database db = cluster.openDatabase();
|
||||
runTests(reps, db);
|
||||
} catch(Throwable t) {
|
||||
|
@ -34,7 +34,7 @@ import com.apple.cie.foundationdb.tuple.ByteArrayUtil;
|
||||
public class LocalityTests {
|
||||
|
||||
public static void main(String[] args) {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database database = fdb.open(args[0]);
|
||||
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ public class ParallelRandomScan {
|
||||
private static final int PARALLELISM_STEP = 5;
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
FDB api = FDB.selectAPIVersion(500);
|
||||
FDB api = FDB.selectAPIVersion(510);
|
||||
Database database = api.open(args[0]);
|
||||
|
||||
for(int i = PARALLELISM_MIN; i <= PARALLELISM_MAX; i += PARALLELISM_STEP) {
|
||||
|
@ -33,7 +33,7 @@ import com.apple.cie.foundationdb.async.AsyncIterable;
|
||||
import com.apple.cie.foundationdb.async.Function;
|
||||
|
||||
public class RangeTest {
|
||||
private static final int API_VERSION = 500;
|
||||
private static final int API_VERSION = 510;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.out.println("About to use version " + API_VERSION);
|
||||
|
@ -34,7 +34,7 @@ public class SerialInsertion {
|
||||
private static final int NODES = 1000000;
|
||||
|
||||
public static void main(String[] args) {
|
||||
FDB api = FDB.selectAPIVersion(500);
|
||||
FDB api = FDB.selectAPIVersion(510);
|
||||
Database database = api.open("T:\\circus\\tags\\RebarCluster-bbc\\cluster_id.txt");
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
@ -94,4 +94,4 @@ public class SerialInsertion {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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(500);
|
||||
FDB api = FDB.selectAPIVersion(510);
|
||||
Database database = api.open(args[0]);
|
||||
|
||||
for(int i = 1; i <= THREAD_COUNT; i++) {
|
||||
|
@ -36,7 +36,7 @@ public class SerialTest {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
final int reps = 1000;
|
||||
try {
|
||||
Cluster c = FDB.selectAPIVersion(500).createCluster(CLUSTER_FILE);
|
||||
Cluster c = FDB.selectAPIVersion(510).createCluster(CLUSTER_FILE);
|
||||
Database db = c.openDatabase();
|
||||
runTests(reps, db);
|
||||
|
||||
|
@ -31,7 +31,7 @@ public class TestApp {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
Cluster cluster = FDB.selectAPIVersion(500).createCluster("C:\\Users\\Ben\\workspace\\fdb\\fdb.cluster");
|
||||
Cluster cluster = FDB.selectAPIVersion(510).createCluster("C:\\Users\\Ben\\workspace\\fdb\\fdb.cluster");
|
||||
System.out.println("I now have the cluster");
|
||||
Database db = cluster.openDatabase();
|
||||
|
||||
|
@ -34,7 +34,7 @@ public class TupleTest {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
final int reps = 1000;
|
||||
try {
|
||||
Cluster c = FDB.selectAPIVersion(500).createCluster(CLUSTER_FILE);
|
||||
Cluster c = FDB.selectAPIVersion(510).createCluster(CLUSTER_FILE);
|
||||
Database db = c.openDatabase();
|
||||
runTests(reps, db);
|
||||
} catch(Throwable t) {
|
||||
|
@ -43,7 +43,7 @@ public class VersionstampExample {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database db = fdb.open();
|
||||
Transaction tr = db.createTransaction();
|
||||
tr.mutate(MutationType.SET_VERSIONSTAMPED_VALUE, "foo".getBytes(), "blahblahbl".getBytes());
|
||||
|
@ -34,7 +34,7 @@ import com.apple.cie.foundationdb.async.Future;
|
||||
public class WatchTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
FDB fdb = FDB.selectAPIVersion(500);
|
||||
FDB fdb = FDB.selectAPIVersion(510);
|
||||
Database database = fdb.open(args[0]);
|
||||
database.options().setLocationCacheSize(42);
|
||||
Transaction tr = database.createTransaction();
|
||||
|
@ -43,8 +43,8 @@ module.exports = {
|
||||
throw new Error('Cannot select multiple different FDB API versions');
|
||||
if(version < 500)
|
||||
throw new RangeError('FDB API versions before 500 are not supported');
|
||||
if(version > 500)
|
||||
throw new RangeError('Latest known FDB API version is 500');
|
||||
if(version > 510)
|
||||
throw new RangeError('Latest known FDB API version is 510');
|
||||
|
||||
if(!selectedApiVersion.value) {
|
||||
fdb.apiVersion(version);
|
||||
|
@ -22,6 +22,6 @@
|
||||
#ifndef FDB_NODE_VERSION_H
|
||||
#define FDB_NODE_VERSION_H
|
||||
|
||||
#define FDB_API_VERSION 500
|
||||
#define FDB_API_VERSION 510
|
||||
|
||||
#endif
|
||||
|
@ -18,7 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var fdb = require('../lib/fdb.js').apiVersion(500);
|
||||
var fdb = require('../lib/fdb.js').apiVersion(510);
|
||||
var fdbModule = require('../lib/fdbModule.js');
|
||||
|
||||
console.log(fdb.tuple.pack([-Math.pow(2,53)]));
|
||||
|
@ -36,7 +36,7 @@ def _add_symbols(module, symbols):
|
||||
globals()[symbol] = getattr(module, symbol)
|
||||
|
||||
def api_version(ver):
|
||||
header_version = 500
|
||||
header_version = 510
|
||||
|
||||
if '_version' in globals():
|
||||
if globals()['_version'] != ver:
|
||||
|
@ -26,7 +26,7 @@
|
||||
module FDB
|
||||
@@chosen_version = -1
|
||||
def self.api_version(version)
|
||||
header_version = 500
|
||||
header_version = 510
|
||||
if @@chosen_version >= 0
|
||||
if@@chosen_version != version
|
||||
raise "FDB API already loaded at version #{@@chosen_version}."
|
||||
|
@ -159,7 +159,7 @@ public:
|
||||
Void _ = wait(self->testAtomicOpApi(cx, self, MutationRef::Min, key, [](uint64_t val1, uint64_t val2) { return val1 < val2 ? val1 : val2; }));
|
||||
|
||||
// Current API Version
|
||||
setApiVersion(&cx, 510); // TODO: Remove 510
|
||||
setApiVersion(&cx, currentApiVersion);
|
||||
TraceEvent(SevInfo, "Running Atomic Op Min Correctness Current Api Version").detail("Version", currentApiVersion);
|
||||
Void _ = wait(self->testAtomicOpSetOnNonExistingKey(cx, self, MutationRef::Min, key));
|
||||
Void _ = wait(self->testAtomicOpApi(cx, self, MutationRef::Min, key, [](uint64_t val1, uint64_t val2) { return val1 < val2 ? val1 : val2; }));
|
||||
@ -179,7 +179,7 @@ public:
|
||||
Void _ = wait(self->testAtomicOpApi(cx, self, MutationRef::And, key, [](uint64_t val1, uint64_t val2) { return val1 & val2; }));
|
||||
|
||||
// Current API Version
|
||||
setApiVersion(&cx, 510); // TODO: Remove 510
|
||||
setApiVersion(&cx, currentApiVersion);
|
||||
TraceEvent(SevInfo, "Running Atomic Op AND Correctness Current Api Version").detail("Version", currentApiVersion);
|
||||
Void _ = wait(self->testAtomicOpSetOnNonExistingKey(cx, self, MutationRef::And, key));
|
||||
Void _ = wait(self->testAtomicOpApi(cx, self, MutationRef::And, key, [](uint64_t val1, uint64_t val2) { return val1 & val2; }));
|
||||
|
@ -554,7 +554,7 @@ struct WriteDuringReadWorkload : TestWorkload {
|
||||
else if (type == MutationRef::AppendIfFits)
|
||||
return doAppendIfFits(existingValue, value, arena);
|
||||
else if (type == MutationRef::And)
|
||||
return doAnd(existingValue, value, arena);
|
||||
return doNewAnd(existingValue, value, arena);
|
||||
else if (type == MutationRef::Or)
|
||||
return doOr(existingValue, value, arena);
|
||||
else if (type == MutationRef::Xor)
|
||||
@ -562,7 +562,7 @@ struct WriteDuringReadWorkload : TestWorkload {
|
||||
else if (type == MutationRef::Max)
|
||||
return doMax(existingValue, value, arena);
|
||||
else if (type == MutationRef::Min)
|
||||
return doMin(existingValue, value, arena);
|
||||
return doNewMin(existingValue, value, arena);
|
||||
else if (type == MutationRef::ByteMin)
|
||||
return doByteMin(existingValue, value, arena);
|
||||
else if (type == MutationRef::ByteMax)
|
||||
|
@ -76,7 +76,7 @@ func read_blob(t fdb.ReadTransactor, blob_subspace subspace.Subspace) ([]byte, e
|
||||
}
|
||||
|
||||
func main() {
|
||||
fdb.MustAPIVersion(500)
|
||||
fdb.MustAPIVersion(510)
|
||||
|
||||
db := fdb.MustOpenDefault()
|
||||
|
||||
|
@ -198,7 +198,7 @@ func (doc Doc) GetDoc(trtr fdb.Transactor, doc_id int) interface{} {
|
||||
}
|
||||
|
||||
func main() {
|
||||
fdb.MustAPIVersion(500)
|
||||
fdb.MustAPIVersion(510)
|
||||
|
||||
db := fdb.MustOpenDefault()
|
||||
|
||||
|
@ -116,7 +116,7 @@ func (graph *Graph) get_in_neighbors(trtr fdb.Transactor, node int) ([]int, erro
|
||||
}
|
||||
|
||||
func main() {
|
||||
fdb.MustAPIVersion(500)
|
||||
fdb.MustAPIVersion(510)
|
||||
|
||||
db := fdb.MustOpenDefault()
|
||||
|
||||
|
@ -87,7 +87,7 @@ func (wrkspc Workspace) Session(foo func(directory.DirectorySubspace)) (err erro
|
||||
}
|
||||
|
||||
func main() {
|
||||
fdb.MustAPIVersion(500)
|
||||
fdb.MustAPIVersion(510)
|
||||
|
||||
db := fdb.MustOpenDefault()
|
||||
|
||||
|
@ -124,7 +124,7 @@ func (multi MultiMap) MultiIsElement(trtr fdb.Transactor, index, value interface
|
||||
|
||||
func main() {
|
||||
|
||||
fdb.MustAPIVersion(500)
|
||||
fdb.MustAPIVersion(510)
|
||||
|
||||
db := fdb.MustOpenDefault()
|
||||
|
||||
|
@ -100,7 +100,7 @@ func (prty Priority) Peek(trtr fdb.Transactor, max bool) interface{} {
|
||||
|
||||
|
||||
func main() {
|
||||
fdb.MustAPIVersion(500)
|
||||
fdb.MustAPIVersion(510)
|
||||
|
||||
db := fdb.MustOpenDefault()
|
||||
|
||||
|
@ -101,7 +101,7 @@ func (q *Queue) FirstItem(trtr fdb.Transactor) (interface{}, error) {
|
||||
func main() {
|
||||
fmt.Println("Queue Example Program")
|
||||
|
||||
fdb.MustAPIVersion(500)
|
||||
fdb.MustAPIVersion(510)
|
||||
|
||||
db := fdb.MustOpenDefault()
|
||||
|
||||
|
@ -128,7 +128,7 @@ func (tbl Table) TableGetCol(tr fdb.ReadTransactor, col int) ([]interface{}, err
|
||||
}
|
||||
|
||||
func main() {
|
||||
fdb.MustAPIVersion(500)
|
||||
fdb.MustAPIVersion(510)
|
||||
|
||||
db := fdb.MustOpenDefault()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user