Commit Graph

304 Commits

Author SHA1 Message Date
Daniil GItelson a38827b4e6 Java Binding: add option to not close network thread on shutdown hook 2020-02-02 21:10:23 +03:00
A.J. Beamon 72f92626e4 Update API version to 700 2020-01-30 09:26:27 -08:00
Xin Dong 68f6e7be97 Added some java docs and changed some texts in fdboptions for further comparision and clarification around .asList() and .iterator() 2020-01-29 14:01:54 -08:00
A.J. Beamon 341e74eaf2 Add retry loop to Java binding tester instruction reader 2020-01-17 11:59:44 -08:00
Alvin Moore 06e7bc061d
Merge pull request #2500 from apple/release-6.2
Merge Release 6.2 Into Master
2019-12-23 15:00:34 -08:00
Alvin Moore 6acf04bb72 Ensured that the cmake variable is always initialized/set to some value when compared and thereby has an expected value 2019-12-23 11:50:01 -08:00
Alvin Moore c0614bc037
Merge pull request #2492 from apple/release-6.2
Release 6.2 Merge Into Master
2019-12-20 15:21:33 -08:00
Alvin Moore c7fc72af39 Changed the name of the java jar to conform with the existing prerelease nomenclature 2019-12-20 12:23:28 -08:00
A.J. Beamon 48c0c3d67c
Merge pull request #2460 from apple/release-6.2
Release 6.2 Merge Into Master
2019-12-13 14:11:08 -08:00
A.J. Beamon 000f7ff2a0
Merge pull request #2457 from gauravvnera/doc_blitz_clear_range
DocBlitz : Clarify Documentation for clear_range API
2019-12-13 12:36:24 -08:00
gauravvnera 83da581314 addressed review comments 2019-12-14 00:10:25 +05:30
gauravvnera f788ba5f85 Add keyAfter method to Java bindings 2019-12-13 19:25:43 +05:30
gauravvnera 1dedd3df56 Clarify Documentation for clear_range 2019-12-13 09:18:57 +05:30
A.J. Beamon 3cc3f1d2ad Note that range reads are supported natively by the database and have little cost over regular range reads. 2019-12-12 10:50:21 -08:00
Alvin Moore bdc16def8e
Merge pull request #2437 from AlvinMooreSr/publish_cmake
CMake Publishing Changes
2019-12-12 06:50:04 -08:00
Xin Dong 8016d02699 Added documents explaining the at-most-once guarantee provided by add callbacks function 2019-12-11 14:45:39 -08:00
A.J. Beamon bdbc97c452 Add docuentation about opening connections to multiple clusters 2019-12-10 12:38:37 -08:00
Alvin Moore 53ea319ec7 Added support for publishing jni library to the packages/lib directory 2019-12-10 11:44:45 -08:00
Evan Tschannen 0953bf376d fixed Javadoc headings 2019-10-25 13:38:04 -07:00
Andrew Noyes 95c6c9618e Update documentation and testers for new options 2019-09-05 16:40:12 -07:00
Evan Tschannen b509a441e7 Merge branch 'master' into feature-skip-confirm
# Conflicts:
#	bindings/flow/tester/Tester.actor.cpp
#	bindings/go/src/_stacktester/stacktester.go
#	bindings/java/src/test/com/apple/foundationdb/test/AsyncStackTester.java
#	bindings/java/src/test/com/apple/foundationdb/test/StackTester.java
#	bindings/python/tests/tester.py
#	bindings/ruby/tests/tester.rb
#	documentation/sphinx/source/api-c.rst
#	documentation/sphinx/source/api-python.rst
#	documentation/sphinx/source/api-ruby.rst
#	documentation/sphinx/source/data-modeling.rst
#	documentation/sphinx/source/developer-guide.rst
#	fdbclient/vexillographer/fdb.options
#	fdbserver/MasterProxyServer.actor.cpp
2019-07-27 15:08:13 -07:00
A.J. Beamon bc5c65e5ab
Merge pull request #1756 from jzhou77/db-option
Add transaction getApproximateSize() API
2019-07-19 08:33:24 -07:00
Alec Grieser a26980682d
Merge pull request #1835 from TWarszawski/master
Add more information to the java binding jar's MANIFEST.
2019-07-18 14:01:46 -07:00
A.J. Beamon 93be69b6a3 Increase the API version to 620. 2019-07-18 10:56:05 -07:00
Todd Warszawski 24c7960c12 Removing uneccessary attributes from MANIFEST 2019-07-16 12:46:40 -07:00
TWarszawski b0a6e2d2c4
Update bindings/java/CMakeLists.txt
Fix Specification-Title

Co-Authored-By: Alec Grieser <alloc@apple.com>
2019-07-16 11:22:10 -07:00
Evan Tschannen 7390df35a1 updated binding testers to set causalReadRisky 2019-07-15 11:39:03 -07:00
Todd Warszawski af35061200 Addressing reviewer comments. 2019-07-15 08:51:22 -07:00
A.J. Beamon d5051b08dd Make trace event field lengths (and total event sizes) default knobified and configurable. Add a transaction option to control the field length of transaction debug logging. Make the program start command line field less likely to be truncated. 2019-07-12 16:12:35 -07:00
Jingyu Zhou 990c205f70 Push a string to stack for getApproximateSize in binding testers
Because different bindings may issue different limit for get_range calls, it is
impossible to return the same size value for getApproximateSize API. So we just
push a string to make sure binding test results are the same. Use another unit
test to make sure the sizes got back are monotonically increasing.
2019-07-12 14:15:20 -07:00
Jingyu Zhou 2dcc3cfd0a Deprecate fdb_future_get_version for version 620
Use fdb_future_get_int64 in all bindings.
2019-07-11 21:17:31 -07:00
Jingyu Zhou b2a89c8b77 Address review comments for PR #1756
Use fdb_future_get_int64 for language bindings and get rid of using Version
with getApproximateSize API.
2019-07-11 16:41:29 -07:00
Todd Warszawski ada31e7dcc Add more information to MANIFEST in jar. 2019-07-11 13:20:15 -07:00
Jingyu Zhou 5d1437c8e0 Push int directly to stack for getApproximateSize 2019-07-10 15:00:50 -07:00
Jingyu Zhou 0802df2c8f Convert size from int to string before pushing onto stack
Using int is troublesome because the size of int can be different from the
desired 64 bits. So, using a string representation seems to be more consistent.
2019-07-10 14:58:35 -07:00
Jingyu Zhou 9d12843a26 Push size as tuple to stack 2019-07-10 14:58:35 -07:00
Jingyu Zhou 0ad2d2d16e Add binding test for getApproximateSize API 2019-07-10 14:58:07 -07:00
Jingyu Zhou 4a15be3643 Code format for fdbJNI.cpp 2019-07-10 14:51:52 -07:00
Jingyu Zhou c50a675bf0 Add transaction getApproximateSize() API
The size is the summation of expected size of mutations, read conflict ranges,
and write conflict ranges.
2019-07-10 14:51:52 -07:00
mpilman 7bfda1faaa Fixed three more Windows issues
This is now compiling on my Windows machine
2019-06-27 11:39:36 -07:00
mpilman ab7562160c Made JavaWorkload an external workload 2019-06-19 13:03:41 -07:00
A.J. Beamon 296adada93 Use c++11 thread_local instead of redefining it to platform specific variants. 2019-05-23 18:35:45 -07:00
Alvin Moore 3acaa7343e Enabled C++17 for all Windows projects
Set Visual Studio version to 2017 (first version to support C++17)
2019-05-16 17:44:13 -07:00
Alvin Moore 94aed513c7 Switched Windows tools within projects to 2017 2019-05-16 15:05:11 -07:00
Alvin Moore 648fc8ec7c
Merge pull request #1472 from mpilman/fixes/no-libfdbc-in-jar
Remove fdb_c from fat-jar
2019-05-01 14:23:56 -07:00
Trevor Clinkenbeard 9fea60675f Fix comments to use transaction_too_old instead of past_version 2019-04-24 18:50:57 -07:00
mpilman abb68cba92 Remove fdb_c from fat-jar
Fixes #1460
2019-04-18 13:26:27 -07:00
mpilman 160949d071 Remove unnecessary function 2019-04-02 16:28:34 -07:00
mpilman d38efac7f8 minor code cleanup 2019-04-02 16:23:36 -07:00
mpilman 371a41dbba Allow classPath to be modified at runtime 2019-04-02 11:56:40 -07:00
mpilman 6facfa931b fixed weird encoding issue 2019-04-02 10:32:09 -07:00
mpilman e23e63c6ac Implemented JavaWorkload
This change allows a user to write a workload in Java.

The way this is implemented is by creating a JVM within the
simulator and calling the corresponding workload class. A
workload can then run in the simulator or on a testing cluster.

If the workload is executed within the simulator, the resulting
test will not be deterministic anymore as it will execute in a
different thread (and even without that it is not clear, whether
we could get determinism as the JVM does a lot of stuff that are
not deterministic).

This is intendet to get better testing of the Java client and
layer authors can use the simulator to test their layers on a single
machine but they can still simulate failing machines etc.
2019-03-31 17:57:43 -07:00
Alec Grieser e6e2ea2af6
Merge remote-tracking branch 'upstream/master' into 00775-database-level-tr-options 2019-03-22 14:41:27 -04:00
Alec Grieser 4fff1f6756
add database options to bindingtester stack tester 2019-03-20 11:13:38 -06:00
Alec Grieser 253597466c
revert temporary testing changes 2019-03-18 13:00:59 -07:00
Alec Grieser ff4386f4e4
TuplePerformanceTester no longer generates malformed UTF-16 2019-03-18 09:43:31 -07:00
Alec Grieser 715c2c980d
Fixes #1186: Tuples: Malformed UTF-16 treated differently in Java and Python
Technically, they are still treated differently in Java and Python, but now, Java throws an exception if it encounters malformed UTF-16 to avoid serializing things in ways that it cannot deserialize. It also now throws an error when reading malformed UTF-8, which I think is safer as it stops it from accidentally doing something like reading bytes and then writing it back but accidentally writing to the wrong spot, but that might be a mistake.
2019-03-18 09:19:54 -07:00
Xin Dong 636d2ca631
Merge pull request #1207 from alecgrieser/tuple-performance-cache-packed
Java: Tuple serialization/deserialization uses fewer allocations
2019-03-13 15:53:52 -07:00
Alec Grieser d9e9e0c521
use bitwise or instead of addition when reconsituting long 2019-03-11 18:26:08 -07:00
Balachandar Namasivayam 36c12cd749 Add missing definitions. 2019-03-11 17:49:03 -07:00
Alec Grieser 7340298202
remove debugging printing that was accidentally added 2019-03-11 16:57:36 -07:00
Alec Grieser f66ddb13c2
rewrite replace without a buffer to use replace with a buffer to first get length 2019-03-11 16:57:36 -07:00
Alec Grieser 75e475563a
clarify comments and be more strict about using UUID_BYTES constant 2019-03-11 16:57:36 -07:00
Alec Grieser 40aa2ba6f0
CMakeLists alphabetization and Javadoc improvements 2019-03-11 16:57:36 -07:00
Alec Grieser 39fd30330f
memoize incomplete versionstamp information in Tuples ; add more tests 2019-03-11 16:55:01 -07:00
Alec Grieser 663d750e1d
pack Tuples with a single byte array allocation of the right size 2019-03-11 16:55:01 -07:00
Alec Grieser a74dfa5487
compare strings by unicode codepoint without copying 2019-03-11 16:55:01 -07:00
Alec Grieser e9771364d7
various Java tuple performance tweaks
These include:

* Memoizing packed representations within Tuples
* Using longs instead of BigIntegers if possible
* As much as possible sticking to manipulating primitive types when using floats/doubles
2019-03-11 16:55:00 -07:00
Alec Grieser e6ce0ebd27
improve tuple performance tester for more types and add serialization check in TupleTest 2019-03-11 16:55:00 -07:00
Alec Grieser 78ff3d92c1
memoize the packed Tuple representation 2019-03-11 16:55:00 -07:00
A.J. Beamon 083a73b0d2 In our binding testers, stop using the TRANSACTION_LOGGING_ENABLE option and switch to the DEBUG_TRANSACTION_IDENTIFIER and LOG_TRANSACTION options 2019-03-11 13:35:43 -07:00
A.J. Beamon 4941d6dc3c
Merge pull request #1212 from alecgrieser/00719-read-transaction-set-read-version
Java: Move a few methods relevant to read-only transactions to `ReadTransaction`
2019-03-11 09:49:57 -07:00
Alec Grieser 83e4b966d5 Resolves #1235: Java: FDBExceptions are created successful operation completion (#1236)
The native function `NativeFuture::Future_getError` now returns `null` when the error code is 0 instead of an `FDBException` with a "Success" message and an error code of 0. This was only used in two places within the codebase; those two places now check for `null` errors and treats them like successes.
2019-03-06 18:34:36 -08:00
Alex Miller af617d68e6 boost 1.52.0 -> 1.67.0 in all vcxproj files 2019-03-05 22:06:12 -08:00
Alec Grieser eb8a085cf9
conditional add read conflict methods now return whether they added the conflict range ; test added for snapshot transactions 2019-03-02 09:48:53 -08:00
Alec Grieser 7ef189701e
Resolves #719: Support `.setReadVersion()` on `ReadTransaction` 2019-03-02 09:48:49 -08:00
A.J. Beamon ad8bfc1b8f
Merge pull request #1166 from alecgrieser/tuple-performance-improvements
Java Tuples: Hash and equality improvements
2019-02-25 15:10:45 -05:00
mpilman 9b14aeb156 Tell cmake not to link/install on ide build 2019-02-19 15:16:59 -08:00
Alec Grieser 9bf4940249
Memoize Tuple hashes and do not pack for equality check 2019-02-18 08:54:25 -08:00
Alec Grieser c6947db091
Add a basic performance tester of Java Tuples 2019-02-18 08:54:21 -08:00
mpilman ddddda7328 docker-compose can now build rpm
weirdly it still generates a foundationd-unspecified
rpm. However, it is empty and can be ignored for now
2019-02-15 00:01:42 -08:00
mpilman ffaaaf5028 build fat-jar with packages
The packages target will now build the fat jar and
it will place the jar file into the packages directory
2019-02-15 00:01:42 -08:00
mpilman 75f692b931 simplify actorcompiler and target to compile coveragetool 2019-02-15 00:01:42 -08:00
mpilman 70545e07d8 Added documentation on how to build the jar-files 2019-02-15 00:01:42 -08:00
mpilman 1ed149e624 Add option to build fat jar 2019-02-15 00:01:42 -08:00
mpilman f601aa7407 Make Java an optional dependency 2019-02-15 00:01:42 -08:00
mpilman 7a858b902d Most of FDB compiling on Windows with cmake 2019-02-07 15:37:04 -08:00
A.J. Beamon 2173e0acda Remove ClusterOptions from generated sources in Java 2019-01-25 09:30:02 -08:00
Andrew Noyes 1c1e42396c ClusterOptions.java is no longer generated 2019-01-24 16:04:56 -08:00
Andrew Noyes 6b34d62918 Fix GENERATED_JAVA_DIR 2019-01-24 15:59:18 -08:00
Andrew Noyes aa566a755f Account for file mv's/rm's in java bindings cmake 2019-01-24 15:41:27 -08:00
A.J. Beamon 8451c0cfc1 Favor nullptr in JNI code. 2019-01-10 13:13:21 -08:00
A.J. Beamon bfa97d7ff2 Address review comments 2019-01-10 12:28:14 -08:00
A.J. Beamon 11cce3731b Merge branch 'master' into remove-cluster-from-bindings
# Conflicts:
#	bindings/c/fdb_c.cpp
2019-01-10 11:58:34 -08:00
Bhaskar Muppana 5a8419e5cf Move Java specific setup into bindings/java/CMakeLists.txt
and s/SET/set
2019-01-02 21:19:08 -08:00
Markus Pilman df0f491c29 Some more improvements to the build and preparations for packaging 2018-12-13 15:04:13 -08:00
Markus Pilman f8eac70700 Fixed C bindings DLLEXPORT and Java bindings 2018-12-13 14:59:36 -08:00
A.J. Beamon 96b9cbcfcf fdb_c.cpp needs access to the legacy types, the C binding test uses the new API, and a couple javadoc links fixed. 2018-11-26 13:07:36 -08:00
A.J. Beamon 890a0f3e82 Merge branch 'master' into remove-cluster-from-bindings
# Conflicts:
#	bindings/flow/fdb_flow.actor.cpp
2018-11-26 12:01:03 -08:00
A.J. Beamon d5357d2439 Update all of the bindings to use the new C API and deprecate or remove unneeded parts of their APIs. 2018-10-02 15:28:46 -07:00