Commit Graph

1279 Commits

Author SHA1 Message Date
Scott Fines 85a6e65e16
Merge pull request #4385 from scottfines/instrumented_java
Add the ability to instrument java driver actions
2021-03-09 13:46:31 -06:00
Scott Fines bdc888ba0a fixing formatting errors 2021-03-09 11:34:15 -06:00
Scott Fines 2db95bebf9
Merge branch 'release-6.3' into buffer_defaults 2021-03-09 08:53:12 -06:00
Scott Fines 329d6052b6 making times record counts too 2021-03-09 08:41:10 -06:00
Scott Fines df6faa089a Addressing PR comments 2021-03-08 14:10:20 -06:00
Scott Fines a9324ebbf6 Adjust default native buffer sizes to be more efficient 2021-03-08 13:31:44 -06:00
Scott Fines 6e32eb75dc Adding a reference implementation of EventKeeper 2021-03-08 09:58:31 -06:00
Scott Fines e080e989ac Better approach to non-locked stats gathering (including knowing what thread will operate) 2021-03-08 09:52:02 -06:00
Scott Fines 6c4ce1769d Moving external calls outside of the pointer lock 2021-03-08 08:46:06 -06:00
FDB Formatster 8a8c488ede apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-05 18:13:38 -06:00
Scott Fines 397af989bb More PR comments 2021-03-05 15:15:05 -06:00
Scott Fines 75be7243e8 Addressing PR comments 2021-03-05 14:27:00 -06:00
Scott Fines c6731cc053 Basic instrumentation of Java Bindings 2021-03-05 14:26:46 -06:00
Russell Sears 15168f33f2
Merge pull request #4394 from vishesh/task/generated.go
Update generated.go
2021-03-05 06:08:04 -08:00
Markus Pilman 061c733a9c
Merge pull request #4405 from sfc-gh-anoyes/anoyes/cluster-for-java-test
anoyes/cluster-for-java-test
2021-03-02 10:22:21 -07:00
Andrew Noyes e62cdbad3b Mention that tests share an fdb cluster 2021-03-02 16:31:58 +00:00
Evan Tschannen 346a4e3ecd Merge branch 'release-6.3'
# Conflicts:
#	fdbcli/fdbcli.actor.cpp
#	fdbrpc/LoadBalance.actor.h
#	fdbrpc/MultiInterface.h
#	fdbserver/ClusterController.actor.cpp
#	fdbserver/MasterProxyServer.actor.cpp
#	fdbserver/masterserver.actor.cpp
2021-03-01 18:52:06 -08:00
Andrew Noyes 18ee11e69a Use add_fdbclient_test for java integration tests
Also change add_fdbclient_test to run its subcommand with FDB_CLUSTER_FILE set
2021-03-02 01:54:17 +00:00
Scott Fines 7054328d8a New Unit and Integration Tests, and associated infrastructure.
First, this converts the java unit testing framework to junit 5.

Then we create some easy unit tests, move TupleTest logic into unit
tests, and move some other tests into ArrayUtilTests.

This also adds new cmake configuration to run junit and integration tests
through ctest.

There is a mechanism to write integration tests that depend on a running
fdb cluster by having those tests be skipped if they can't connect to a
database quickly. This should help to add those tests in CI, although
eventually we'll probably want to move this to throw an error instead
(once the CI build process clears out and we can guarantee a running
server during CI testing).

Converting to junit 5
2021-03-01 09:11:45 -06:00
Vishesh Yadav 95f5a73a3d go: Update generated.go 2021-02-26 11:22:31 -08:00
Scott Fines 236510652d Resolves 4323: make Junit tests run as separate ctest tests.
This adds the ability to run junit tests through ctest a little more
easily (no Suites required). It also adds a small amount of
documentation to explain to the average developer how to go about using
Junit effectively.
2021-02-24 14:24:23 -06:00
Scott Fines 3d1bb99d90
Merge pull request #4336 from scottfines/test_conversions
Converting existing tests to using Unit (where possible)
2021-02-24 14:21:51 -06:00
Scott Fines 0bf7f9cf63 New Unit and Integration Tests, and associated infrastructure.
First, this converts the java unit testing framework to junit 5.

Then we create some easy unit tests, move TupleTest logic into unit
tests, and move some other tests into ArrayUtilTests.

This also adds new cmake configuration to run junit and integration tests
through ctest.

There is a mechanism to write integration tests that depend on a running
fdb cluster by having those tests be skipped if they can't connect to a
database quickly. This should help to add those tests in CI, although
eventually we'll probably want to move this to throw an error instead
(once the CI build process clears out and we can guarantee a running
server during CI testing).

Converting to junit 5
2021-02-24 09:35:35 -06:00
Meng Xu 471a3489fb Resolve review comments and add trace fields to MasterRecoveryState 2021-02-17 14:44:14 -08:00
Scott Fines 2589c26907 Resolves 4323: make Junit tests run as separate ctest tests.
This adds the ability to run junit tests through ctest a little more
easily (no Suites required). It also adds a small amount of
documentation to explain to the average developer how to go about using
Junit effectively.
2021-02-12 15:34:04 -06:00
Meng Xu 9122be4d81 Add comments to HA code and loadBalance code 2021-02-10 13:51:36 -08:00
Chaoguang Lin 1ae883b150 Update to use C++ random generator 2021-02-09 19:06:13 -08:00
Chaoguang Lin 0f969f0f95 Initilize random seed in the snapshot c function unit test when generating UID 2021-02-09 16:05:37 -08:00
Chaoguang Lin 5b2c015747 fix indent 2021-02-09 01:45:43 -08:00
Chaoguang Lin 1d964e8c4a update unit test 2021-02-09 01:41:39 -08:00
Chaoguang Lin 90686a95a0 format code 2021-02-08 22:17:16 -08:00
Chaoguang Lin 7c1ef37bcb format code 2021-02-08 21:42:40 -08:00
Chaoguang Lin 61082e70e1 format code, add comments 2021-02-08 19:11:30 -08:00
Chaoguang Lin e3c1530a15 format code 2021-02-08 18:56:12 -08:00
Chaoguang Lin fd7b1f64d0 Remove IDE added header 2021-02-08 18:41:20 -08:00
Chaoguang Lin cd54eae545 Update test and documentation 2021-02-05 15:30:43 -08:00
Chaoguang Lin a85458dd1e Merge branch 'master' of github.com:apple/foundationdb into add-c-function-snapshot 2021-02-05 14:14:52 -08:00
Chaoguang Lin 97925de9d4 Update fdb_database_create_snapshot to take a UID as input 2021-02-05 14:14:38 -08:00
Andrew Noyes 961950f03a Add dependency to fdb_c 2021-02-05 03:37:52 +00:00
Andrew Noyes 75f8725392 Add test for using an external client 2021-02-05 01:24:45 +00:00
Vishesh Yadav 5b5dd0a0d4
Merge pull request #4204 from sfc-gh-ljoswiak/features/network-tracer
Add network option to set tracer in fdbclient
2021-01-27 20:00:49 -08:00
Chaoguang Lin f9b38ab682 fix typo 2021-01-26 14:26:01 -08:00
Chaoguang Lin cef53b2b40 clang-format 2021-01-26 12:06:40 -08:00
Chaoguang Lin 5f912f0deb Add snapshot c function 2021-01-26 11:53:35 -08:00
Andrew Noyes 564c70acb4
Merge branch 'master' into anoyes/modernize-use-override 2021-01-25 18:26:18 -08:00
Andrew Noyes 0ef44739ea Fix OPEN_FOR_IDE build in preparation for using clang-tidy 2021-01-26 02:04:11 +00:00
Lukas Joswiak 29c0e05ea6 Clarify naming of distributed tracing options 2021-01-22 17:30:33 -08:00
Chaoguang Lin 9b5fc3b638 Update code 2021-01-21 01:22:53 -08:00
Chaoguang Lin 116f034933 update var names 2021-01-21 01:11:40 -08:00
Chaoguang Lin b4c91e65fe Remove unnecessary header, update var names 2021-01-21 01:03:27 -08:00
Chaoguang Lin e075d5a036 clang-format 2021-01-21 00:59:25 -08:00
Chaoguang Lin ef24acfc66 Add comments 2021-01-21 00:50:46 -08:00
Chaoguang Lin 9cd7c43a2c Add c function fdb_database_force_recovery_with_data_loss 2021-01-21 00:42:23 -08:00
Jingyu Zhou b8ff724232
Merge pull request #4173 from sfc-gh-anoyes/anoyes/fdb-c89-test
Make sure that fdb_c.h is c90 compliant
2021-01-19 10:42:40 -08:00
Andrew Noyes 13afadfae4 Use c90 compatibility for clarity 2021-01-15 02:50:34 +00:00
Chaoguang Lin 8ce9bd4e8e Merge branch 'master' of github.com:apple/foundationdb into add-c-function-for-management-commands 2021-01-14 17:31:26 -08:00
Chaoguang Lin d25b8664e7 clang-format, remove header added by IDE 2021-01-14 17:31:13 -08:00
Chaoguang Lin a44fa7bfe6 Remove unnecessary rapidjson download 2021-01-14 17:17:12 -08:00
Chaoguang Lin 3fb056e9fe Revert "Let rapidjson as a module in cmake"
This reverts commit 5ffb280aad.
2021-01-05 23:53:42 -08:00
Chaoguang Lin 5ffb280aad Let rapidjson as a module in cmake 2021-01-05 09:53:06 -08:00
Chaoguang Lin be11ab7a3d Remove unnecessary depedency 2021-01-04 23:50:23 -08:00
Chaoguang Lin 70e4b88a04 Remove stdbool header 2021-01-03 22:54:56 -08:00
Chaoguang Lin da7b65cd71 Change the interface back to return int64_t 2021-01-03 22:45:09 -08:00
Chaoguang Lin d97782f6d5 Revert python bindings change 2021-01-03 17:27:25 -08:00
Chaoguang Lin 4ed5761d24 Revert java bindings change 2021-01-03 17:24:20 -08:00
Andrew Noyes 9b7c93ca86 Make sure that fdb_c.h is c89 compliant 2020-12-22 10:30:07 -08:00
Chaoguang Lin 3715cf50a2 merge conflict 2020-12-21 18:04:45 -08:00
Jingyu Zhou 0ecfaf138e
Merge pull request #4150 from sfc-gh-ljoswiak/fixes/sps-tracing
Remove "a/" from tracing keys in special-key-space
2020-12-21 13:48:01 -08:00
Chaoguang Lin b68d84aaea Merge remote-tracking branch 'upstream/master' into add-c-function-for-management-commands 2020-12-21 12:32:31 -08:00
Chaoguang Lin e69f1a804e Add RebootWorker java bindings 2020-12-20 22:52:38 -08:00
Andrew Noyes 9601769b01
Merge pull request #3858 from sfc-gh-rchen/stable_interfaces
Stable interfaces
2020-12-11 09:34:27 -08:00
Lukas Joswiak 43fd545f06 Remove a/ from tracing path in special-key-space 2020-12-09 13:40:16 -08:00
A.J. Beamon be53b2b603
Merge pull request #4095 from sfc-gh-kmakino/kaomakino/mako_streaming_modes
Add streaming mode support to mako
2020-12-09 10:53:36 -08:00
Lukas Joswiak 54237f28ea Throw error on commit for late trace options 2020-12-07 14:43:44 -08:00
Lukas Joswiak 18201d6f4f Add option to enable transaction tracing 2020-12-07 11:24:14 -08:00
Richard Chen b4ea82435c fix typo in python 2020-12-07 00:18:22 +00:00
Lukas Joswiak ae096e4ba7 Add special-key-space tracing tests 2020-12-04 11:22:11 -08:00
Chaoguang Lin 88a5e4593f Add wrapper for Database and BoolFuture 2020-12-04 00:32:37 -08:00
Chaoguang Lin dca2207ee7 update reboot_worker in python binding to return boolean 2020-12-03 12:04:29 -08:00
Chaoguang Lin 934f7de96e Update reboot_worker api in flow binding 2020-12-03 12:03:35 -08:00
Chaoguang Lin 5921d5ef57 Add reboot_worker to c api and add unit test for it 2020-12-03 12:02:49 -08:00
Chaoguang Lin 7e70537f2c Add rapidjson dependency to c_unit_tests, used for parsing status json 2020-12-03 11:52:59 -08:00
Richard Chen c77d9e4abe merge conflicts 2020-12-02 21:53:19 +00:00
Kao Makino 9c198fbd84 Add streaming mode support to mako 2020-11-19 17:20:36 -08:00
Chaoguang Lin 2320f970c1 Add reboot_worker and pythong binding 2020-11-19 16:43:39 -08:00
Chaoguang Lin aec0398fd0 Merge remote-tracking branch 'upstream/master' into add-c-function-for-management-commands 2020-11-17 11:39:12 -08:00
Richard Chen d8a2a3c708 fix fdb_error_t usage warning 2020-10-30 02:31:49 +00:00
Andrew Noyes 48c5ebf93b Do leak check before stopping network 2020-10-29 21:45:28 +00:00
Chaoguang Lin a72bb52eae Merge branch 'master' of github.com:apple/foundationdb into add-c-function-for-management-commands 2020-10-28 22:32:44 -07:00
Richard Chen a671aa773e add symbol to python global symbols 2020-10-24 00:19:05 +00:00
Richard Chen 560da75257 remove unit test print 2020-10-23 19:39:21 +00:00
Richard Chen 309e38dc06 add unit test and some cleanup 2020-10-23 19:34:18 +00:00
Richard Chen 90caa24af1 add function to get correct checksum class. Remove IChecksum::checkSum function 2020-10-23 02:24:29 +00:00
Richard Chen a4ccf8c5b6 add checksum class to change checksum in the future. expose get server protocol api 2020-10-19 16:57:11 +00:00
Andrew Noyes a1e868a569
Merge pull request #3862 from sfc-gh-tclinkenbeard/use-override-more
Add uses of override keyword, remove unnecessary uses of virtual
2020-10-14 15:06:45 -07:00
Andrew Noyes a5b8d3a51a
Merge pull request #3843 from sfc-gh-ljoswiak/c-api-unit-tests
Add C API unit tests
2020-10-13 15:18:15 -07:00
Lukas Joswiak 1975a2847c Check watch up updating value 2020-10-13 14:41:30 -07:00
Lukas Joswiak d90a2c7f0e Fix flaky tests 2020-10-13 13:46:15 -07:00
Lukas Joswiak 4ad2947a39 Replace key_size function 2020-10-13 13:34:15 -07:00
Lukas Joswiak 9ec1f84a9b Replace key macro with function 2020-10-13 12:36:47 -07:00
Lukas Joswiak 8b2ec93ab2 Fix reverse iteration issue 2020-10-13 10:42:55 -07:00
Lukas Joswiak 6aa199b9a2 Add fdb_transaction_add_conflict_range unit test 2020-10-12 16:41:09 -07:00
Xin Dong e9c7408fe0
Merge pull request #3874 from dongxinEric/misc/api-docs-update-for-range-split
Added API doc for the new range split API. Updated some old ones to b…
2020-10-12 10:45:09 -07:00
Xin Dong ac7d95d469 Address review comments 2020-10-12 10:05:17 -07:00
Xin Dong 8f311543f9
Apply suggestions from code review
Co-authored-by: A.J. Beamon <ajbeamon@users.noreply.github.com>
2020-10-12 09:50:45 -07:00
Lukas Joswiak 98f7444104 Add fdb_error_predicate unit test 2020-10-09 22:46:33 -07:00
Lukas Joswiak 74e429c680 Ensure FdbEvent sticks around until all callbacks complete 2020-10-09 20:16:11 -07:00
Lukas Joswiak d37691dd54 Simplify API 2020-10-09 19:01:06 -07:00
Lukas Joswiak 5819267c07 Fix issue with watch timeout 2020-10-09 17:19:45 -07:00
Lukas Joswiak 54118ba706 Add retry loops, test fdb_future_release_memory better 2020-10-09 16:52:13 -07:00
Lukas Joswiak 27c84550f1 Move get_range retry logic to caller 2020-10-09 15:55:25 -07:00
Lukas Joswiak 2d8576c2df Add versionstamp tests 2020-10-09 15:43:00 -07:00
Andrew Noyes c6c94e23ca Fix leaked future in mako 2020-10-09 18:40:05 +00:00
sfc-gh-tclinkenbeard dc4612712d Merge remote-tracking branch 'origin/master' into use-override-more 2020-10-09 07:12:41 -07:00
Xin Dong 079f27d47d Added API doc for the new range split API. Updated some old ones to be consistent. 2020-10-08 15:20:55 -07:00
Xin Dong 5d902f9177
Merge pull request #3394 from dongxinEric/feature/range-split-points-based-on-size
Feature/range split points based on size
2020-10-08 14:25:11 -07:00
Lukas Joswiak 7a356d142c Disable network test, peg doctest to version 2.4 2020-10-08 14:24:36 -07:00
Lukas Joswiak 805a8f5909 Rename Event
Was conflicting with an Event defined in fdbclient, and due to how the unit
tests are currently built, fdb_c includes fdbclient as a dependency.
2020-10-08 11:09:23 -07:00
Lukas Joswiak 1deea78dac Check every watch future for too_many_watches failure 2020-10-07 22:46:15 -07:00
sfc-gh-tclinkenbeard a3de8c333b Use override where applicable in fdbclient 2020-10-07 16:57:38 -07:00
Lukas Joswiak afb8a6d87c Fix unitialized memory 2020-10-06 12:54:47 -07:00
Lukas Joswiak afebd32823 Update transaction timeout test to use repeating read 2020-10-06 11:28:05 -07:00
Lukas Joswiak c9521ec450 Fix issue with pthreads
Linking lpthread before libcrypto seems to have been causing an issue
since the crypto library (used in OpenSSL?) needs threading. Swapping
the order should fix the issue.
2020-10-02 22:01:57 -07:00
Lukas Joswiak 861262ea35 Fix dependency order for doctest 2020-10-02 18:57:07 -07:00
Lukas Joswiak 03c86f5aaa Style fix 2020-10-02 14:02:25 -07:00
Lukas Joswiak e020034bb9 Add transaction size limit, timeout, and atomicity tests 2020-10-02 12:34:14 -07:00
Lukas Joswiak ffd425ec04 Another fix for reading freed memory 2020-10-01 16:51:23 -07:00
Lukas Joswiak 6b275083fe Add atomic bitwise AND and OR tests 2020-10-01 16:14:29 -07:00
Lukas Joswiak 9b85493a63 Fix for reading freed memory 2020-10-01 15:19:52 -07:00
Markus Pilman 268ba0bddc Merge remote-tracking branch 'origin/release-6.3' into merge-6.3 2020-10-01 14:14:06 -06:00
Lukas Joswiak 24e119b181 Simplify error handling 2020-09-30 17:53:41 -07:00
Lukas Joswiak c080514eb4 Add tests 2020-09-30 17:38:58 -07:00
Markus Pilman c5af8c8dd0 Restore pom.xml.in
(which is apparently still in use)
2020-09-30 12:34:35 -06:00
Andrew Noyes cd520dcf93
Merge pull request #3808 from sfc-gh-mpilman/features/ctest-client-smoketests
Add ability to run tests on fdb in ctest
2020-09-29 12:09:51 -07:00
Markus Pilman 3395e2b1a2 fix junit tests 2020-09-28 14:00:48 -06:00
Markus Pilman 38857b9773 remove pom reference 2020-09-28 12:49:12 -06:00
Markus Pilman a5439f39a2 Run junit tests with ctest 2020-09-25 16:28:07 -06:00
Markus Pilman a3c65f81d2 Build with maven (doesn't work yet) 2020-09-25 14:59:25 -06:00
Evan Tschannen 2d788b309f Merge branch 'release-6.2' into release-6.3
# Conflicts:
#	documentation/sphinx/source/api-error-codes.rst
#	flow/ThreadHelper.actor.h
#	flow/error_definitions.h
2020-09-24 17:16:58 -07:00
Meng Xu 862336de8f Merge branch 'master' into mengxu/merge-to-master-PR 2020-09-24 17:06:00 -07:00
Markus Pilman 33d6c412c1 return error code correctly and cmake fixes 2020-09-24 15:58:41 -06:00
Markus Pilman 4c25214085 Add ability to run tests on fdb in ctest 2020-09-24 15:43:05 -06:00
sfc-gh-tclinkenbeard 05c33a98ff Replace NULL with nullptr in java bindings 2020-09-20 11:33:17 -07:00
sfc-gh-tclinkenbeard 8f5eab2629 Replace NULL with nullptr in c bindings 2020-09-20 11:33:17 -07:00
sfc-gh-tclinkenbeard 962bd00f62 Replace NULL with nullptr in flow bindings 2020-09-20 11:33:17 -07:00
Andrew Noyes 01998a238f Add blockUntilReadyCheckOnMainThread 2020-09-17 20:26:28 +00:00
A.J. Beamon 1882410334 Give more detail when describing the range API on a subspace in Go. 2020-09-16 16:25:12 -07:00
Xin Dong c5dd0a1acd Undo the ruby nil check since the compiler generated message is better 2020-09-16 10:06:19 -07:00
Xin Dong e108f041a0 Version the behavior change of existing API so that new behavior only happen after 7.0 2020-09-16 09:43:57 -07:00
Xin Dong acdf04ed18 Make sure Python and Ruby does null check 2020-09-15 14:09:53 -07:00
Chaoguang Lin 3dfadff6d8 Merge remote-tracking branch 'upstream/master' into add-c-function-for-management-commands 2020-09-14 16:45:47 -07:00
Chaoguang Lin dc5b8875ce Format code 2020-09-14 16:45:17 -07:00
Xin Dong 13c9dc6e37 Forgot to update local variables 2020-09-11 16:57:00 -07:00
Xin Dong 0282a1745a Address more review comments 2020-09-11 16:44:09 -07:00
Xin Dong 813a2b3efe Remove a function that have been removed in previous commits in master but was added back by this PR due to target branch change. 2020-09-11 14:30:41 -07:00
Xin Dong 1b923477f7
Apply suggestions from code review
Co-authored-by: A.J. Beamon <ajbeamon@users.noreply.github.com>
2020-09-11 14:28:56 -07:00
Trevor Clinkenbeard 732a457ba4
Merge pull request #3720 from sfc-gh-xwang/mako
update mako and WriteTagThrottling workload so as to trigger tag throttling event
2020-09-10 15:21:00 -07:00
XiaoxiWang ed3dd78e78 add parameter validation; add buffer initialization 2020-09-09 22:06:53 +00:00
Xin Dong c6477bbc61
Merge branch 'master' into feature/range-split-points-based-on-size 2020-09-02 09:41:17 -07:00
Xiaoxi Wang 0031f535d0 let mako support transaction tagging benchmark; 2020-09-01 07:22:14 +00:00
Evan Tschannen 12edadd059 Merge branch 'release-6.3'
# Conflicts:
#	CMakeLists.txt
#	fdbclient/Knobs.cpp
#	fdbclient/MasterProxyInterface.h
#	fdbrpc/simulator.h
#	fdbserver/MasterProxyServer.actor.cpp
#	tests/fast/CycleAndLock.txt
#	tests/fast/TxnStateStoreCycleTest.txt
#	tests/fast/VersionStamp.txt
#	tests/slow/ParallelRestoreOldBackupApiCorrectnessAtomicRestore.txt
#	tests/slow/ParallelRestoreOldBackupCorrectnessCycle.txt
#	versions.target
2020-08-31 19:33:34 -07:00
Vishesh Yadav f080b772aa java-bindings: Fix javadoc errors 2020-08-31 15:08:40 -07:00
Vishesh Yadav 973a9b2423 java-bindings: More typo fix 2020-08-27 14:21:46 -07:00
Vishesh Yadav 775cf06574 java-bindings: Javadoc typo fixes 2020-08-27 14:07:44 -07:00
Vishesh Yadav c103dc3ec9
Update bindings/java/src/main/com/apple/foundationdb/FDB.java
Co-authored-by: Alec Grieser <alloc@apple.com>
2020-08-27 14:01:02 -07:00
Kao Makino b18f802f78 transaction tagging 2020-08-27 13:25:14 -07:00
Vishesh Yadav aa326c030b java-bindings: Changes per review comments
- Add function to check if DirectBuffer queries are enabled.
- Javadoc comment fixes
- Fix min buffer limits.
2020-08-27 11:14:58 -07:00
Vishesh Yadav b3432c0ce0 java-bindings: Addressed review comments
- Change DirectBufferPool constructor to take ByteBuffer
- Moved enableDirectBufferQueries() to public FDB class.
- Handle the edge case in resize() when called in middle of oudstanding queries.
- Don't count space need to store all KV pairs in JNI.
2020-08-26 22:33:59 -07:00
Vishesh Yadav 5d5dab1040 java-bindings: Minors fixes and refactor 2020-08-25 17:01:37 -07:00
Vishesh Yadav 738cd82a85 java-bindings: Add function to disable/enable/resize DirectBuffer 2020-08-25 16:19:42 -07:00
Vishesh Yadav 5cefb27fe2 java-bindings: Addressed review comments 2020-08-25 16:03:27 -07:00
Vishesh Yadav 9123ffb1bf java-bindings: Use DirectBuffer with standard Async call 2020-08-25 14:29:50 -07:00
Vishesh Yadav be184a9dc2 java-bindings: Use DirectBuffer for `getRange` requests #3682
This patch keeps a batch of Java's DirectBuffers, which can be shared with JNI C
world. This means:

1. No need for JNI wrapper to make several JNI calls, to allocate and convert
   Java objectd to bytes.
2. We already made a PR #3582 to reduce 3 JNI calls for each getRange() i.e. to
   fetch summary and then results. As mentioned in that PR, this patch also
   makes similar decision to make `getDirectRange()` call synchronous and
   instead schedule it asynchronously in Java executor.
3. No need for JNI to dynamically allocate buffers to store KVs.
4. Use one big DirectBuffer to make request and get reponse. `DirectBuffers` give
   direct access to the memory, and are much fast than the regular non-direct
   buffers we use.
5. We keep a pool of reasonably big DirectBuffers, which are borrowed and
   returned by `getRange()` requests.

The downside to this are:

1. We have to manually and "carefully" serialize and deserialize the
   request/response both in C and Java world. It is no longer high-level Java
   objects.
2. Because `DirectBuffers` are expensive, we can only keep a few of them, which
   number of outstanding `getRange()` requests are limited by that.
3. Each request, currently uses 2 buffers, one for current chunk and one for
   outstanding request.
4. The performance bump seems to be excellent for bigger key-values. We didn't
   observe significant difference for smaller KV sizes (I can't say its better
   or worse, as from quick glance it didn't look statistically significant to me).

Performance is currently measured using `PerformanceTester.java`, which measures
throughput for several operations. The results are:

```
 1. Using Key = 16bytes, Value = 100bytes
=========================================

Without this PR=>
                                                           Count     Avg    Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  -----  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  30  349363  73590  316218    342523  406445  540731
get_single_key_range throughput (local client) [keys/s]       30    7685   6455    6981      7744    8129    9773

** With this PR ==>
                                                           Count     Avg    Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  -----  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  30  383404  70181  338810    396950  437335  502886
get_single_key_range throughput (local client) [keys/s]       30    7029   5515    6635      7090    7353    8219

=======================================
2. Using Key = 256bytes, Value = 512bytes
========================================

** Without this PR ==>
                                                           Count     Avg     Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  ------  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  90  132787  102036  122650    130204  138269  202790
get_single_key_range throughput (local client) [keys/s]       90    5833    4894    5396      5690    6061    8986

** With this PR ==>
                                                           Count     Avg     Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  ------  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  90  359302  196676  310931    344029  407232  494259
get_single_key_range throughput (local client) [keys/s]       90    7227    5573    6771      7177    7477   10108
====================================================================================================================

=======================================
3. Using Key = 128bytes, Value = 512bytes
========================================

** Without this PR ==>
                                                           Count     Avg     Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  ------  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  30  235661  148963  213670    229090  256825  317050
get_single_key_range throughput (local client) [keys/s]       30   10441    6302   10586     10873   10960   11065
====================================================================================================================

** With this PR ==>
                                                           Count     Avg     Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  ------  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  30  350612  185698  320868    348998  406750  459101
get_single_key_range throughput (local client) [keys/s]       30   10338    6570   10664     10847   10901   11040
====================================================================================================================
```

NOTE: These tests were run on a shared VM. Benchmark in each group was run
serially, and the groups themselves run at different times. Therefore there
might be some skew based on load, but the difference is compelling enough to
show that there is performance benefit for larger KV.
2020-08-24 23:34:54 -07:00
Vishesh Yadav 9c7b502b68 java-bindings: Combine getSummary() and getResult() into single JNI
RangeQuery makes getSummary() and getResult() JNI calls, which are redundant in
nature. This patch combines them into single call.

This reduce 3 JNI to 2 JNI calls. Next logical step is to remove the 2nd JNI
call, i.e. getResults() after getRange() which is slighly more convoluted
because C API doesn't allow primitives to compose new Futures.
2020-08-24 23:34:47 -07:00
Chaoguang Lin 23ef23357c Test code to add c function for kill/suspend 2020-08-21 14:30:52 -07:00
Chaoguang Lin 9b096ab58e Merge branch 'master' of github.com:apple/foundationdb into add-c-function-for-management-commands 2020-08-21 12:20:35 -07:00
Xin Dong daead84fdd Merge master 2020-08-14 14:07:08 -07:00
Evan Tschannen 2f52c5f79b Merge branch 'release-6.3'
# Conflicts:
#	fdbserver/RestoreLoader.actor.cpp
2020-08-11 22:45:43 -07:00
Alvin Moore 1933826737 Fixed typos and removed extraneous space 2020-08-11 13:09:41 -04:00
Alvin Moore ba9f203858 Fixed warnings for documentation greater than and less than characters which appear as errors within Java 1.8
Removed broken link
2020-08-11 03:26:56 -04:00
Xin Dong a46e620baa Merge branch 'master' into feature/range-split-points-based-on-size 2020-08-06 15:23:11 -07:00
Tao Lin 077b618675
Fix broken doc links in ReadTransaction.java 2020-08-05 09:45:05 -07:00
Chaoguang Lin 00f2c38e3a Merge remote-tracking branch 'upstream/master' into add-c-function-for-management-commands 2020-08-03 20:55:21 -07:00
Chaoguang Lin 11cbcffc9a Temporary code 2020-07-30 16:07:54 -07:00
Evan Tschannen a49cb41de7 Merge branch 'release-6.3'
# Conflicts:
#	CMakeLists.txt
#	cmake/ConfigureCompiler.cmake
#	fdbserver/Knobs.cpp
#	fdbserver/StorageCache.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	flow/ThreadHelper.actor.h
#	flow/serialize.h
#	tests/CMakeLists.txt
2020-07-29 00:31:55 -07:00
Evan Tschannen 3f1e51c821
Merge pull request #3543 from dongxinEric/doc/add-explanation-about-accuracy-of-estiamted-range-size-api
Added some explanation about the accuracy about the get estimated ran…
2020-07-27 11:03:17 -07:00
Evan Tschannen e1dedff7b3 Merge branch 'release-6.2' into release-6.3
# Conflicts:
#	CMakeLists.txt
#	bindings/c/test/mako/mako.c
#	cmake/ConfigureCompiler.cmake
#	documentation/sphinx/source/downloads.rst
#	fdbcli/fdbcli.actor.cpp
#	fdbclient/FileBackupAgent.actor.cpp
#	packaging/msi/FDBInstaller.wxs
#	versions.target
2020-07-24 12:10:44 -07:00
Andrew Noyes 7e10464fc5 Fix a few java warnings
Finally got vscode to understand the java bindings.
Adding this to .vscode/settings.json did the trick

    "java.project.referencedLibraries": [
        "fdb-build/packages/*.jar"
    ]

Where fdb-build is my cmake build dir
2020-07-23 17:28:37 +00:00
Xin Dong 9e1f253c08 Added some explanation about the accuracy about the get estimated range size API. 2020-07-21 16:14:23 -07:00
Jingyu Zhou 9a65b1fbd9
Merge pull request #3528 from Daniel-B-Smith/declval
s/fake/std::declval/
2020-07-21 14:34:37 -07:00
Meng Xu aa4c378cd7
Merge pull request #3539 from apple/release-6.3
Merge Release 6.3 into master
2020-07-21 14:05:13 -07:00
Daniel Smith a88bbd6405 s/fake/declval/ 2020-07-15 23:33:01 +00:00
Andrew Noyes f077d9889b Fix osx build 2020-07-10 09:46:32 -07:00
Andrew Noyes 6446b4c082 WIP 2020-07-09 22:02:43 +00:00
Andrew Noyes c3532e029a Fix warnings in mako 2020-07-09 21:16:15 +00:00
Meng Xu 1b68665228 Merge branch 'master' into release-6.3 2020-07-08 18:52:05 -07:00
Russell Sears 92ab2c84b6 Improved assert messages for numeric comparisons 2020-07-08 11:36:50 -07:00
sfc-gh-tclinkenbeard bcbca81dfe Remove ROW_LIMIT_UNLIMITED and BYTE_LIMIT_UNLIMITED from CLIENT_KNOBS 2020-07-04 12:48:44 -07:00
Xin Dong 7c98cac754 Fix a Go binding error 2020-07-02 16:25:43 -07:00
Xin Dong d689d34634 Enable range split bindings tests 2020-07-02 14:05:12 -07:00