Commit Graph

336 Commits

Author SHA1 Message Date
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
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
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
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
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
Xin Dong c6477bbc61
Merge branch 'master' into feature/range-split-points-based-on-size 2020-09-02 09:41:17 -07: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
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
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
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
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
Meng Xu 1b68665228 Merge branch 'master' into release-6.3 2020-07-08 18:52:05 -07:00
Xin Dong 00e9f8b9bf Added bindings tests; Protected new SSI endpoints under new 7.0 ProtocolVersion 2020-07-02 14:05:12 -07:00
Xin Dong 440630a0cb Added bindings supports 2020-07-02 14:05:11 -07:00
bchavez ecf340da88
Corrects spelling mistakes in various markdown files. 2020-06-28 21:30:34 -07:00
Meng Xu 8595813b7d
Merge pull request #3355 from apple/release-6.3
Merge Release 6.3 into master branch
2020-06-12 20:08:47 -07:00
Vishesh Yadav 5bd8145fbf
Merge pull request #3257 from ajbeamon/fix-java-test-resource-closing
Fix Java tests that weren't closing resources
2020-06-10 13:19:13 -07:00
Steve Atherton 61fcce08cc
Merge pull request #3324 from apple/release-6.3
merge Release 6.3
2020-06-09 18:56:47 -07:00
john_leach c122eff58a Fixes 3316 ByteArrayUtil.join is used heavily and creates a lot of objects 2020-06-09 14:06:12 -07:00
Balachandar Namasivayam a167bf344e Update api version to 700 2020-05-28 12:16:03 -07:00