Commit Graph

2001 Commits

Author SHA1 Message Date
Dennis Zhou 4ea4546cb6 blob/java: verifyBlobRange() with latestVersion 2022-09-21 14:07:16 -07:00
Dennis Zhou 86eac7386f blob/java: fix verifyBlobRange() calling wrong function
verifyBlobRange() accidentally called list_blobbified_ranges().
2022-09-21 14:04:58 -07:00
Jon Fu 0343ca9c53 Merge branch 'main' of github.com:apple/foundationdb into network-disable-bypass 2022-09-21 11:33:27 -07:00
Dennis Zhou 2caf0c7726 blob/java: add purge at latestVersion 2022-09-21 09:46:55 -07:00
Junhyun Shim 2e51a110f2 Fix Python binding's fdb_c lookup
All python documentations indicate you shouldn't put prefixes like 'lib' or
suffixes like '.so', '.dll', or '.dylib' in argument to ctypes.util.find_library(),
unlike ctypes.CDLL() which demands an exact file name.
I suppose this case hasn't been tested.
2022-09-20 22:47:04 +02:00
Jon Fu 1f778f9d76 Merge branch 'main' of github.com:apple/foundationdb into network-disable-bypass 2022-09-20 09:30:53 -07:00
Jon Fu 41e910e9af update generated go bindings 2022-09-20 09:26:21 -07:00
Vaidas Gasiunas 97eddbc06a
Extend ApiTester with support for testing database operations (#8221)
* ApiTester: Refactoring removing unnecessary transaction actor classes

* ApiTester: enable executing non-transactional database operations

* ApiTester: a test for fdb_database_list_blobbified_ranges

* ApiTester: Fix memory ownership of the end key in randomGetRangeOp

* ApiTester: reuse get range result validation in blob granule tests
2022-09-20 16:21:38 +02:00
A.J. Beamon 3a1fa5bd7c
Merge pull request #8223 from sfc-gh-ajbeamon/change-literal-string-ref
Convert literal string ref instances to use _sr suffix
2022-09-19 12:53:17 -07:00
1inker db1f858c64
ANSI C syntax mandates declare functions without parameters with void in parameters list. K&R syntax is obsolete. (#8222) 2022-09-19 12:09:05 -07:00
A.J. Beamon 4fd64630e8 Convert literal string ref instances to use _sr suffix 2022-09-19 11:35:58 -07:00
Jon Fu 1abac8ea9f check on shared state ptr in native api and add to test spec in api tester 2022-09-16 15:11:33 -07:00
Jon Fu 7b0285a205 attempt to pass sim tests and api tests 2022-09-15 11:02:28 -07:00
Jon Fu a7956f42a4 add version guard and add network option to testConfig 2022-09-14 13:15:24 -07:00
Dennis Zhou c65ecb08d1 bindings/c: fix std++fs dependency
Beginning with clang 9, <filesystem> support is included without needing
to link anything else.

https://releases.llvm.org/9.0.0/projects/libcxx/docs/UsingLibcxx.html
2022-09-13 15:01:27 -07:00
Dennis Zhou 540b814446
Merge pull request #8158 from sfc-gh-dzhou/api-version
ApiVersion cleanups
2022-09-13 14:00:22 -07:00
A.J. Beamon e4ce779d8c
Merge pull request #8144 from sfc-gh-ajbeamon/tenant-support-for-api-tester
Tenant support for client testing framework
2022-09-13 09:40:52 -07:00
A.J. Beamon 2d68e246fb Fix a couple other merge issues 2022-09-13 08:23:26 -07:00
Dennis Zhou 4f582e3709 bindingtester: move API_VERSIONS array to global 2022-09-12 17:08:57 -07:00
Dennis Zhou 88d8242bb6 bindings: clean up ApiVersion settings
Currently ApiVersion is scattered and hardcoded across the bindings.
Let's at least clean it up so it's once per file or less and use some
redirection against FDB_API_VERSION or API_VERSION.
2022-09-12 17:08:57 -07:00
Dennis Zhou fed00e0f0c ApiTester: TMP_DIR ApiVersion gate 2022-09-12 17:08:57 -07:00
Dennis Zhou d6d69379a8 ApiVersion: tenant specific guards 2022-09-12 17:08:56 -07:00
A.J. Beamon b0f4e0b997 Fix some merge issues 2022-09-12 15:42:31 -07:00
A.J. Beamon b9c8bdeec6 Extract randomTenant() function; add back accidentally deleted line; move the new multi tenant test and fix a name error in its spec 2022-09-12 15:03:30 -07:00
A.J. Beamon 8086fc819e Some refactoring of tenants in the API tester. This mainly changes it so that tenants are stored on the ApiWorkload and any subclasses can use them. Update the setup phase to work across tenants. 2022-09-12 15:03:30 -07:00
Sagar Vemuri 00276d5700 Move the test to be multithreaded 2022-09-12 15:02:44 -07:00
Sagar Vemuri ccf405c17a Add more workload operations support 2022-09-12 15:02:44 -07:00
Sagar Vemuri 52150a5cf7 Add a new multi-tenant specific Transaction Executor 2022-09-12 15:01:39 -07:00
Sagar Vemuri ba314fbc12 Plumb tenant id from individual workload operation to transaction executor 2022-09-12 14:57:29 -07:00
Sagar Vemuri 6b17326135 Add tenant support 2022-09-12 14:40:47 -07:00
A.J. Beamon 0c91336461 Remove unnecessary special key-space relaxed option in binding tenant management 2022-09-12 14:30:28 -07:00
Jingyu Zhou 48a5fb9e4b
Merge pull request #8094 from sfc-gh-dadkins/sfc-gh-dadkins/fix-c-bindings
Add missing fdb_cpp ->fdb_c dependency.
2022-09-12 09:42:40 -07:00
Vaidas Gasiunas 81fff640bd
Testing with invalid cluster files, fixing update from changed cluster file (#8126)
* ApiTester: test with invalid cluster files

* More asserts in monitorProxies

* ApiTester: Test tampering the cluster file

* Fix update of connection string from the cluster file to use the new connection string only if it valid

* ApiTester: add linker dependency on std++fs

* upgrade_test: no-cleanup-on-error option

* ApiTester: use atomic operations to change and access the transaction handle
2022-09-10 09:23:00 +02:00
A.J. Beamon 726d5215a0
Remove API 720 guards for tenants (experimental feature) and the cluster ID special keys (#8108)
* Remove API 720 guards for tenants (experimental feature) and the cluster ID special keys (no need to guard)

* Enable the relaxed special key access in transactions that need to use special key-space APIs introduced in 7.2
2022-09-08 17:22:36 +02:00
Vaidas Gasiunas b6fb1034a9
Fix crashes on database create errors (#8115)
* ApiTester: enable access to database instances in workloads

* ApiTester: Inject database create errors

* Fix getClusterProtocol and database shared object initialization in case of database create errors

* Check deferred error in all Thread-Safe API calls returning a future

* ApiTester: disable injection of database create errors for tests with old versions
2022-09-08 09:21:51 +02:00
Jon Fu 1c2afeff8d add raw access to create tenant api 2022-09-07 09:10:34 -07:00
Vaidas Gasiunas 599e57b5f2
Use distinct base trace file names for client threads (#7922)
* Save thread indexes for client instances in MVC

* An option to inlude client thread identifiers into trace file names

* Avoid using new trace file options in client versions not supporting them

* Remove redundant include generated by IDE

* Use different base trace file names for client threads by default. Provide an option to revert to using a shared base file name

* Fixing typos in the description of trace_share_among_client_threads
2022-09-06 18:46:42 +02:00
Junhyun Shim f2e68d0566
Merge pull request #8102 from sfc-gh-jshim/fdbcli-tls-connect
Make FDBCLI check coordinator :tls suffix
2022-09-06 16:17:49 +02:00
Junhyun Shim 738a101a58 Add test for fdbcli's coordinator TLS suffix check 2022-09-05 19:27:22 +02:00
Vaidas Gasiunas f60a1e488f
Fixing TSAN error in API Tests: future callback trying to accessed destroyed scheduler (#8016)
* ApiTester: More asserts on workload status; Fixing data race in the cleanup phase

* ApiTester: comments explaining assumptions behind synchronization in TransactionContext; declaring immutable fields as const

* Add build dependency between fdb_c_shim and fdb_c
2022-09-05 13:39:10 +02:00
Dan Adkins 457c5b336a Add missing fdb_cpp ->fdb_c dependency. 2022-09-02 17:41:24 -07:00
Josh Slocum 2251ae0fc2
Added summarize blob granules c api and tests (#8076)
* Added summarize blob granules c api and tests

* addressing review comments

* format
2022-09-02 17:08:51 +02:00
Dennis Zhou 9f948531e1 blob/java: update documentation for blob api 2022-08-31 09:23:33 -07:00
Vaidas Gasiunas 9fb45f349f
Make FDB C shim library static (#8040) 2022-08-31 12:31:07 +02:00
Josh Slocum 825a58880e
Reworked multi-version client readBlobGranules to not get stuck on client version changes (#8017)
* Reworked multi-version client readBlobGranules to not get stuck on version changes

* Addressing review comments
2022-08-30 09:16:09 +02:00
Junhyun Shim 6bcfbf421e Merge remote-tracking branch 'origin/main' into authz-general-tls-and-integration-test 2022-08-26 09:20:31 +02:00
Josh Slocum cfc5ab550e
Update BlobGranules API tests (#7947)
* blob granule fixes from api tests

* Adding BlobGranuleErrors workload

* bug fixes and debugging improvements for blob granule api tests

* cleanup and refactoring of bg api tests

* better memory management for loadAndMaterialize
2022-08-23 17:47:02 -05:00
Junhyun Shim e88d5aa607 Apply new fdb.options to go binding 2022-08-23 22:50:06 +02:00
Dennis Zhou fb3ce21d19 blob/java: verifyBlobRange() java bindings 2022-08-16 13:29:23 -07:00
Dennis Zhou 3d400cff64 blob: verifyBlobRange() c api 2022-08-16 13:29:23 -07:00
Dennis Zhou 045076339d bindings/java: implement getBlobGranuleRanges() bindings 2022-08-16 13:29:23 -07:00
Dennis Zhou 1c2109dcbd blob: add rangeLimit to getBlobGranuleRanges() 2022-08-16 13:29:23 -07:00
Dennis Zhou 03d5942859 blob/java: listBlobbifiedRanges java bindings 2022-08-16 13:29:23 -07:00
Dennis Zhou e4f433a480 bindings/java: add KeyRange bindings 2022-08-16 13:29:23 -07:00
Dennis Zhou d2fd29dc52 blob/java: add (un)blobbifyRange api 2022-08-16 13:29:23 -07:00
Dennis Zhou 2d6b2e490c blob/java: make purgeBlobGranules signatures match 2022-08-16 13:29:23 -07:00
Dennis Zhou ba148ba6f1 blob/java: add default executor functions for purgeBlobGranules 2022-08-16 13:29:23 -07:00
Dennis Zhou 96f3dd67b0 blob: add listBlobbifiedRanges() api 2022-08-16 13:29:20 -07:00
Dennis Zhou cbe9fba5e9 blob: (un)blobbifyRange() c api 2022-08-15 16:25:36 -07:00
Dennis Zhou de732c2603 bindings: add FutureBool future type 2022-08-15 16:25:36 -07:00
Vaidas Gasiunas f04ab582dd
Add documentation for API Tester (#7869)
* Add documentation for API Tester

* API Tester documentation: addressing review comments
2022-08-15 15:10:15 +02:00
Vaidas Gasiunas c387e140cd
Test more C API in upgrade tests (#7853)
* Test more C API in upgrade tests

* Fix saving results in blob granule API correctness test

* Enable multitenancy in upgrade test with API version >=720

* Disable the upgrade test with blob granule workload
2022-08-15 11:08:53 +02:00
Marian Dvorsky 35a3a33d1c
Resolve TSAN-related issues in ctests (#7864) 2022-08-12 19:23:32 +02:00
Xiaoge Su 0326d53965 Split proxy_memory_limit_exceeded to commit/grv specific exceptions
Currently GRV is reporting proxy_memory_limit_exceeded error which has
error message claiming Commit proxy failing. This split should remove
such confusion.
2022-08-12 00:45:57 -07:00
Vaidas Gasiunas d0905704c9
Disable shim library tests in sanitizer builds (#7821) 2022-08-09 11:27:52 +02:00
A.J. Beamon 351656af6a
Fix: the static tenant map in the Java tester was being accessed concurrently from multiple threads. Make it a concurrent map. (#7805) 2022-08-08 10:19:43 -07:00
Vaidas Gasiunas 79571dd2b4
Testing upgrades to a future version of FDB (#7780)
* Enable configuring the next future protocol version as the current protocol version in FDB client, fdbserver, and fdbcli

* Auto format python files used in upgrade tests

* Add a test for upgrading to a future FDB version

* Emphasize that the options for using future protocol version are intended for test purposes only

* Make the global variable for current protocol version visible only locally

* Refactirng to avoid using currentProtocolVersion() in static intialization

* Update go bindings
2022-08-08 17:29:49 +02:00
A.J. Beamon 390bac4e11 Reset the default transaction size limit at the end of the size limit test so future tests aren't artificially limited 2022-08-05 09:41:18 -07:00
Andrew Noyes 5dbb6f1dd3
Make Tuple::pack return a Standalone<StringRef> (#7764)
This makes it less error-prone and more like other similar functions
like BinaryWriter::toValue

Closes #7748
2022-08-02 12:45:56 -07:00
Andrew Noyes db348598a1 Update Python target name to Python3 2022-07-29 14:57:29 -07:00
Nim Wijetunga 3e45b6657c
Merge pull request #7714 from sfc-gh-nwijetunga/nim/tenant-encryption-property
Encryption as a tenant property
2022-07-29 11:30:19 -07:00
Vaidas Gasiunas d99d0370b1
C shim library: API for setting client library path; additional tests (#7702)
* Adding sources of the Implib.so project

* Run C unit tests and API tests with the shim library

* Reuse compilation of C test binaries with and without shim library

* Resolve client library path from an environment variable

* Refactoring: Reusable module for downloading FDB binaries

* Testing client shim library with current version and last release version

* Tests for specifying client library over an environment variable

* Enable C shim library tests on ARM

* Restore the original path for including fdb_api.hpp

* Improve cmake dependencies on doctest

* Remove unnecessary Implib.so files

* Shim library: API to specify path to the library, additional tests

* Adding shim library to Linux distribution packages

* Update link dependencies of fdb_c_shim_lib_tester

* Add dependencies on Implib.so sources

* Abort on fatal errors of shim library

* fix typo
2022-07-29 11:45:45 +02:00
Nim Wijetunga cc1b8d27c9 fix tests 2022-07-27 16:26:59 -07:00
A.J. Beamon 59ccdc35ab Disallow configuring the same tenant parameter more than once at a time. Made some slight changes to serialization code for tenants. 2022-07-26 09:04:29 -07:00
A.J. Beamon 35fd459002 Some test fixes 2022-07-26 09:04:29 -07:00
A.J. Beamon a64693518a Add support for tenant groups 2022-07-26 09:04:29 -07:00
Josh Slocum 01b7e5395e
Merge pull request #7530 from sfc-gh-jslocum/forgot_java_bindings
Java bindings for BG Purge (#6816)
2022-07-25 08:56:51 -05:00
A.J. Beamon 9459d0c6ca
Merge pull request #7661 from sfc-gh-ajbeamon/tenant-metadata-key-backed-types
Use key-backed types for tenants
2022-07-22 14:01:45 -07:00
Lukas Joswiak 6c17ca038a Add delay to allow for global config sync time 2022-07-22 10:37:29 -07:00
A.J. Beamon 17146c484b Use key-backed types for tenants. Add a tenant state field that will be used in upcoming work. Some other tenant related refactoring. 2022-07-21 20:33:28 -07:00
Andrew Noyes 45c8a4e09d
Build fixes/improvements for sanitizers (#7657)
* Don't build fdb c shim with ubsan

This avoids duplicate symbols when linking. It doesn't really make sense
to assemble files with -fsanitize=undefined anyway, since it won't
insert instrumentation.

* Consolidate boost_asan with boost_target
2022-07-21 12:43:38 -07:00
A.J. Beamon 190ad8c7e9 Convert existing tuple usages to use Tuple::makeTuple() 2022-07-19 13:45:59 -07:00
A.J. Beamon 1b81e72604 Add a Tuple::makeTuple function to easily construct a tuple. Update Tuple to allow all types to be passed via .append() so they can be used with makeTuple. 2022-07-19 11:50:58 -07:00
A.J. Beamon 02ab3b05ab
Merge pull request #7590 from sfc-gh-ajbeamon/update-prefix-encoding-in-tenant-metadata-json
Use a more standard encoding in the JSON metadata reported for tenants
2022-07-15 14:32:53 -07:00
Marian Dvorsky ce4dc0fb0f
Update ctest_to_joshua to work with new ctests (#7584)
* Package inferred directories to the resulting tarball in ctest_to_joshua (except for the root source and build directories). This allows the API tests (which specify the workloads as a directory containing the workload specification files) to now work.
* Add bin/mkcert which is used by some tests.
* Rewrite fdb_c_shim_tests.py to specify its dependencies on command line.
2022-07-14 18:34:48 +02:00
A.J. Beamon 91ccdbcb03 Use a more standard encoding in the JSON metadata reported for tenants. 2022-07-13 15:22:19 -07:00
A.J. Beamon a3f970cf3a Parse integer options in fdbcli rather than passing the bytes unparsed. This allows specifing the string "1" instead of "\x01\x00\x00\x00\x00\x00\x00\x00". 2022-07-11 16:39:59 -07:00
Markus Pilman 4ece33a0a8
Merge pull request #7445 from sfc-gh-anoyes/anoyes/fix-ubsan
Fix UBSAN build when statically linking libcxx
2022-07-11 17:27:37 -06:00
Vaidas Gasiunas 0a2e5c830c
C shim library build clean up (#7560)
* Remove unnecessary Implib.so files

* Improve cmake dependencies on doctest
2022-07-11 17:57:28 +02:00
john_leach afa1120874 Changing hasIncompleteVersionstamp to use iteration rather than stream processing #7543 2022-07-08 13:27:40 -07:00
Vaidas Gasiunas 1e8feb9cb8
Generate a shim library for the FDB C API (#7506)
* Adding sources of the Implib.so project

* Run C unit tests and API tests with the shim library

* Reuse compilation of C test binaries with and without shim library

* Resolve client library path from an environment variable

* Refactoring: Reusable module for downloading FDB binaries

* Testing client shim library with current version and last release version

* Tests for specifying client library over an environment variable

* Enable C shim library tests on ARM

* Restore the original path for including fdb_api.hpp
2022-07-08 16:28:35 +02:00
Marian Dvorsky 24d7e0d28b
Add WatchAndWait API client test workload (#7524)
* Add WatchAndWait workload

* Reimplement without Notification

* Handle errors

* Finish comment

* Simplify the test by introducing commit(/*complete=*/false)

* Fix a race condition

* Refactor

* Remove unused capture

* Add assert for has_value

* Automatically adjust numClientThreads
2022-07-08 11:57:38 +02:00
Andrew Noyes 00743e4b46 Don't set linker script for ubsan 2022-07-07 10:19:20 -07:00
Andrew Noyes c3abfdc20d Use c++ as linker language for c targets with UBSAN 2022-07-07 10:18:30 -07:00
A.J. Beamon c4b0f6eaae
Add an internal C API to support connection to a cluster using a connection string (#7438)
* Add an internal C API to support memory connection records

* Track shared state in the client using a unique and immutable cluster ID from the cluster

* Add missing code to store the clusterId in the database state object

* Update some arguments to pass by const&
2022-07-07 10:12:49 +02:00
A.J. Beamon ae6d6e0e72
Merge pull request #7402 from sfc-gh-jfu/jfu-mako-active-tenants
Introduce concept of "active" versus "total" tenants in mako
2022-07-06 14:23:11 -07:00
Jon Fu 61b3e1f51e add comment about our tenant encoding 2022-07-06 13:16:24 -07:00
Jon Fu af78a2ef5f move tr options to outside loop 2022-07-06 13:07:47 -07:00
A.J. Beamon 1e8225a19e
Merge pull request #7511 from sfc-gh-ajbeamon/add-subrange-support-to-tenant-special-keys
Update the tenant special keys submodule to support multiple sub-ranges
2022-07-06 10:33:14 -07:00
Josh Slocum ea2dffc37d Java bindings for BG Purge (#6816) 2022-07-06 12:41:56 -04:00
Marian Dvorsky 975978d938
Add getKey support to ApiCorrectnessWorkload (#7517)
* Add getKey support to ApiCorrectnessWorkload

* Address review comments
2022-07-05 10:16:29 +02:00
A.J. Beamon aff21f062f Fix indentation and refactor prefix construction to be in forward order 2022-07-01 09:50:05 -07:00
A.J. Beamon 2f67328a0c Update the tenant special keys submodule to support multiple sub-ranges. This will enable future work that allows configuring tenants at the same time as creating them. 2022-06-30 15:03:37 -07:00
Jon Fu cd41e62a10 provide workaround for json parser and bytestring not being preserved properly 2022-06-30 13:25:29 -07:00
Marian Dvorsky 0baa76c430
Add AtomicOpsCorrectness client API workload test (#7419)
Add AtomicOpsCorrectness client API workload test
2022-06-30 18:47:16 +02:00
Marian Dvorsky 1b7b6f1b6f
Add getRange workload to apitester (#7461)
* Add getRange workload to apitester

* Run clang-format

* Clear the results vector first

* Run clang-format
2022-06-29 14:00:25 +02:00
Jon Fu 9a484f2dca attempt to issue all tenant reads first 2022-06-28 13:46:44 -07:00
Jon Fu 0c79714d70 Merge branch 'main' of github.com:apple/foundationdb into jfu-mako-active-tenants 2022-06-28 11:25:36 -07:00
Jon Fu 5f7f846388 change getTenant to read from special key space and also batch tenant clear ranges 2022-06-28 11:24:53 -07:00
Jon Fu 59fd6ac7a3 remove check for total tenants on createNewTransaction 2022-06-28 09:26:48 -07:00
Markus Pilman 1bdbd89839 Merge remote-tracking branch 'origin/main' into features/cmake-refactor-dirs 2022-06-28 08:52:03 -06:00
Markus Pilman ce30774bc1 fixed api tester build 2022-06-27 19:27:57 -06:00
Markus Pilman 03d913a1de Flow compiling 2022-06-27 17:05:55 -06:00
Jon Fu 2dccbd7e70 Merge branch 'main' of github.com:apple/foundationdb into jfu-mako-active-tenants 2022-06-27 14:20:50 -07:00
A.J. Beamon 7dee9fb4fd Add a test for the new JSON output 2022-06-27 12:34:40 -07:00
Jon Fu 4bd586a8e4 introduce tenant_batch_size argument and change tenant creation/deletion to do many in one transaction. Also introduce getTenant to fdb_api.hpp 2022-06-24 11:56:15 -07:00
Markus Pilman a47ed89018 Linux fixes and addressed review comments 2022-06-23 20:52:13 -06:00
Markus Pilman 38e100ebc5 flow bindings are compiling 2022-06-23 19:06:05 -06:00
Markus Pilman d35445a868 enforce include modularization in cmake 2022-06-23 14:37:35 -06:00
Jon Fu 9158d79e8e increase batch size and fix asymptomatic off-by-one error 2022-06-23 10:37:44 -07:00
Vaidas Gasiunas e28a8401fb
Update coordinator list from cluster file (#7382)
* Log failed connection attempts in monitorProxies

* Update coordinator list from the cluster file after failing to connect to all coordinators

* Wiggle and upgrade test with legacy version monitoring; updating tests to use 7.1.9

* Update coordinator list from the cluster file: addressing review comments

* Update coordinator list from the cluster file: addressing review comments

* Wait on future for all setAndPersistConnectionString calls
2022-06-23 09:22:09 +02:00
Jon Fu 67d2630507 fix off-by-1 error in batches 2022-06-22 14:26:31 -07:00
Jon Fu d0a3e64ed3 change batch tenant creation logic 2022-06-22 13:45:12 -07:00
Jon Fu e3ea9f5c73 Merge branch 'main' of github.com:apple/foundationdb into jfu-mako-active-tenants 2022-06-22 10:31:58 -07:00
Jon Fu aa8982c1fb allow only active tenants to be specified in args and use batch tenant creation in populate 2022-06-22 10:31:12 -07:00
Jon Fu c473a94250 modify changeNewTransaction logic 2022-06-17 13:56:33 -07:00
Josh Slocum 34e6a8f942
Merge pull request #7399 from sfc-gh-jslocum/bg_tenant_improvements
Bg tenant improvements
2022-06-17 11:19:41 -05:00
Josh Slocum 1cc466e068 fixes and review comments 2022-06-17 08:17:44 -05:00
sfc-gh-tclinkenbeard 111e28d0ea Merge remote-tracking branch 'origin/main' into fix-unused-var 2022-06-16 17:20:18 -07:00
Jon Fu 97115f17d5 update usage message 2022-06-16 16:03:14 -07:00
Josh Slocum b3597ef3a8 Added plumbing for tenant-aware purge granules 2022-06-16 13:04:34 -05:00
Jon Fu 9bfc6ee59e Merge branch 'main' of github.com:apple/foundationdb into jfu-mako-active-tenants 2022-06-16 10:32:20 -07:00
Jon Fu 2b9c8ca874 introduce concept of active versus total tenants in mako 2022-06-15 15:30:02 -07:00
Jon Fu 06c8f9068e fix arg parse ordering 2022-06-14 16:45:58 -07:00
Jon Fu 184c266bdf adjust rows calculation after parsing all arguments but before validation 2022-06-14 16:34:39 -07:00
Jon Fu 6999ebc86f When provided tenants, divide number of rows by number of tenants. Adjust population and range reads to account for this scenario 2022-06-14 16:22:07 -07:00
Hao Fu 9cee4c94e7
Safely remove fdb_transaction_get_range_and_flat_map (#7314) 2022-06-13 19:05:00 -07:00
Andrew Noyes 2a8d8a1932
Fix more heap overflows (#7360)
From calling strlen on a not necessarily null-terminated buffer.
2022-06-13 13:13:05 -07:00
sfc-gh-tclinkenbeard 13efda66fd Fix -Wunused-but-set-variable warning in DDSketchBase::percentile 2022-06-13 10:18:31 -07:00
Junhyun Shim 631a59a65e
Merge pull request #7299 from sfc-gh-mdvorsky/mdvorsky/remove_tester_api_wrapper
Remove TesterApiWrapper, replace its uses with fdb_api.hpp
2022-06-09 10:42:05 +02:00
Robert Barabas 8606923da2
Arm64 related build fixes (#7319)
* Add missing include

* Fix open call on arm64

* Bump up doctest to 2.4.8
2022-06-08 11:20:27 -07:00
Andrew Noyes 07f49392ac
Avoid using structured bindings in doctest assertions (#7335)
* Avoid using structured bindings in doctest assertions

clang doesn't allow this with the latest releases of doctest

This will unblock #7319

* Add constructor to MappedKV
2022-06-08 09:36:18 -07:00
Andrew Noyes e0eedc6a37
Fix asan message detection (#7338)
* Fix asan message detection

* Fix heap-buffer-overflow

Call to strlen on a not necessarily null terminated string

* Fix gcc build
2022-06-08 09:35:30 -07:00
Marian Dvorsky 21b041317c Address review comments 2022-06-08 16:45:29 +02:00
Ray Jenkins 5a4082bfe8
Add DistributedTracerClient enum to mako. (#7297) 2022-06-07 14:07:08 -05:00
A.J. Beamon c97a1168cb Fix formatting issue 2022-06-07 08:51:10 -07:00
A.J. Beamon 0431635674
Merge branch 'main' into jfu-mako-tenant-support 2022-06-07 08:43:56 -07:00
Kevin Hoxha e579038018
Add DDSketch to mako (#7167)
* Add logic for DDSketch in mako

* Return double from percentile() and fix crash in deserialize()

* make sure to serialize and print result from mergeSketchReport()

* clean up comments

* move ddsketch into its own file

* remove LatencySampleBin and add DDSketch to ThreadStatistics

* Update DDSketch implementation

* remove assertions that cause circular references

* add DDSketchMako as a subsclass from DDSketch

* Merge branch 'ddsketch_mako' of github.com:sfc-gh-khoxha/foundationdb into ddsketch_mako

* Revert "Merge branch 'ddsketch_mako' of github.com:sfc-gh-khoxha/foundationdb into ddsketch_mako"

This reverts commit cc29a68aef.

* add ddsketch mako class and rename export flag

* remove redundant decimal roundings

* print max/min/avg from ddsketch

* remove latency sample bin completly

* Make ThreadStatistics dump latency to a file and read from file in printReport()

* make sure to add latency data from file to final stats

* change mergeSketchReport to use new ThreadStatistics serialization (1)

* use C-style string arrays in Arguments instead of std::string

* remove unused header

* only serialize non-empty sketches

* fix CentOS build error

* Update report file count properly

* avoid deserializing empty sketches

* fix segmentation fault when getting file name for export_sketch_path

* make sure to properly add file to report_files list

* fix printing bugs when running in report mode

* fix incorrect insertion of report files

* don't use range based loop for char array

* don't reset args.num_report_files

* Update the usage info for new options

* switch to using std::vector for sketches instead of std::array

* make sure to use true/false instead of 1/0 for booleans

* remove op_name if not being used

* remove fp code in dumpThreadSamples

* replace lambda with function in printReport

* merge and print stats in seperate functions

* make sure to exit after printing report

* address review feedback

* make defaultMin, defaultMax static and move setBucketSize to protected

* switch to reverse iterators when moving backwards along bucket array
2022-06-06 18:19:31 -07:00
Clement Pang 043bc411ee
Make KeyArrayResult constructor public. (#7308) 2022-06-06 13:15:33 -07:00
Marian Dvorsky f887e3e364 Address review comments 2022-06-06 16:29:42 +02:00
Hao Fu 96d3951205
Fix versionstamp in Tester (#7312) 2022-06-03 08:56:01 -07:00
Marian Dvorsky d41ec69b23 Remove TesterApiWrapper, replace its uses with fdb_api.hpp 2022-06-03 11:55:33 +02:00
Hao Fu e7fa8e9f6f
Add versionstamp support in tuple (#7293)
Tuple in C++ needs to support Versionstamp.
2022-06-02 17:44:10 -07:00
Junhyun Shim 3e79735b2f
Authz JWT support (#7279)
* Add JWT support to TokenSign

* Encapsulate OpenSSL public/private key type

Type-safe passing around of keys without having to DER/PEM-serialize
(OpenSSL doesn't have distinct types for public and private key)

* Apply Clang format

* Add verify benchmark for JWT and FlatBuffers token

* Unit test base64url::{encode, decode}

* Make all payload fields optional

Let user code validate non-signature fields

* Make all payload fields optional

Completely defer field check to user code

* Move rapidjson from fdbclient to contrib

* Make fdbrpc's rapidjson linkage private

Currently only sources include them.

* Modify rapidjson path in apiversioner.py

* Algorithm::Unknown > Algorithm::UNKNOWN
2022-06-02 13:22:50 +02:00
Marian Dvorsky 138618eef9
Include symbols from fdb_c_internal.h to C bindings client library for Apple platform (#7292) 2022-06-01 14:04:53 -07:00
A.J. Beamon 526d8b217e Fix formatting issues 2022-05-31 11:37:52 -07:00
A.J. Beamon ee3508c2f8 Address review comments. Primarily, this changes Tenant creation to be done via a method call on Database. 2022-05-31 11:19:02 -07:00
Junhyun Shim f76d2454f5
Correctly wait on onError() future
Currently Mako worker thread waits on the original future that produced the error. Not the future returned by onError. Fix this.
2022-05-27 23:36:33 +02:00
Jon Fu 3bf4a8d521 move transaction creation to outside outer populate loop 2022-05-27 15:59:57 -04:00
Jon Fu 55972ca07e address code review comments 2022-05-27 10:57:57 -04:00
Jon Fu 8a7a8d0d59 delete tenants in memory when workload is done running 2022-05-26 17:14:41 -04:00
Jon Fu 8180414b4a remove printf debugging statements 2022-05-26 16:51:31 -04:00
Jon Fu c6ac9cf2a5 Merge branch 'main' of github.com:apple/foundationdb into jfu-mako-tenant-support 2022-05-26 16:29:52 -04:00
Jon Fu ddda238c01 fix issues with tenant creation/deletion and temporary tenants and strings 2022-05-26 16:29:16 -04:00
Jon Fu 01fa56630a WIP commit attempting to solve some tenant open and deletion issues 2022-05-26 14:55:59 -04:00
Jon Fu c24970915f fix off-by-one error 2022-05-25 12:16:15 -04:00
Jon Fu f25450ddd8 keep tenants in memory when running workload and introduce tenants to async run 2022-05-25 11:23:58 -04:00
Lukas Joswiak 18f80256b0 Add versionepoch fdbcli tests
Also removes the old targetversion fdbcli tests, as this command has
been removed (at least for now).
2022-05-23 11:45:18 -07:00
Junhyun Shim 02b2f97e99
mTLS test helpers (#7218)
* Add TLS option to (local_cluster|tmp_cluster).py

* Add TLS-enabled C API test
2022-05-23 12:47:51 +02:00
Kao Makino a9d62ea031
Merge pull request #7169 from sfc-gh-khoxha/main
Use correct transaction latency in async mako
2022-05-20 15:49:39 -07:00
Chaoguang Lin 5e8c3130e6 Extend the reboot interface to accept comma-delimited string;
Only fetch requested worker interfaces in rebootWorkerActor
Add killall test to multiprocess_fdbcli_tests
Make the rebootWorker only sends requests if all the requested workers are valid
Add comments; Organize print texts; Fix the bug clear the map every time run kill/suspend/expensive_data_check
2022-05-20 12:06:33 -07:00
Jon Fu 8ae951079f remove extra space for CI formatting 2022-05-20 13:28:26 -04:00
Jon Fu 612b94efa3 remove tenant_main arg and use CharsRef in error message format 2022-05-20 13:16:49 -04:00
Jon Fu b92b3b21b0 Refactor Tenant class in fdb_api header to match conventions of existing classes and move tenant creation into populate function 2022-05-20 13:03:59 -04:00
Hao Fu fc8d04b19d
Make java binding work for prefetch match index modes. (#7186)
* Make java binding work for prefetch match index modes.

It adds boundaryAndExist in return value, so that caller can see
whether a boundary index is orphan or not.

* Make Java code work with index match modes

* Add test for boundaryAndExist in java binding test
2022-05-20 09:10:02 -07:00
Jon Fu cdca68e26a only use tenant management prefix and default tenants to 0 in mako 2022-05-18 17:26:05 -04:00
Jon Fu 5a1c7f5c08 attempt to create fdb_api.cpp to separate static declaration 2022-05-18 17:16:30 -04:00
Jon Fu cc6620e9bb fix CI errors 2022-05-18 16:03:44 -04:00
Hao Fu dcacb30688
Add missing secondary queries tests for index prefetch (#7185)
* Add missing secondary queries tests for index prefetch

This change adds test for missing secondary queries for index prefetch,
in this case, MATCHED_ONLY mode would NOT return KV and UNMATCHED_ONLY
mode would return KV.

* remove default value for params
2022-05-18 12:13:19 -07:00
Jon Fu 17c8b4b2a0 Initial mako changes introducing Tenant API and replacing transaction resets 2022-05-18 14:48:40 -04:00
Hao Fu f00606fd71
Enable MATCHED and UNMATCHED mode for index prefetch (#7162)
* Enable MATCHED and UNMATCHED mode for index prefetch

MATCHED mode returns index entries whose secondary KVs are present,
UNMATCHED mode returns index entries whose secondary KVs are absent.

Note that the conflict read range of this txn is set in 2 steps:
* Set the conflict range for primary query according to request
* Set the conflict ranges for secondary queries according to responses.

As a result, conflicts of different match_index mode are taken care of.

* Fix c binding
2022-05-18 09:16:28 -07:00
Vaidas Gasiunas 5205b565ab
Upgrade Tests: Testing downgrade from 7.2 to 7.1 (#7179) 2022-05-18 11:59:29 +02:00
Ray Jenkins 7594f5c0f9
Mako add distributed tracing client (#7180)
* Add support for specifying distributed client tracer in Mako.

Introduces a new command line option --distributed_tracer_client. Defaults to disabled, user may specify
disabled, log_file, network_lossy, or sim_end.

Testing locally and verified with distributed tracing receiver. Note: We use a simple integer here
to denote tracer type rather directly using the TracerType enum in flow/Tracing.h. Including Tracing.h pulls in
FDBTypes.h and results in conflicts with several classes, including Database.
2022-05-17 15:23:14 -05:00
Vaidas Gasiunas 9966e3f7f7 Api Tester: print workload progress statistics in regular time intervals 2022-05-17 17:35:01 +02:00
Kevin Hoxha 4e6265537a Add correct transaction latency in ResumableStateForRunWorkload::onTransactionSuccess() 2022-05-16 14:06:55 -07:00
Alec Grieser 940ca2c6b8
Merge pull request #7166 from imperatorx/keyarrayresult-add-getter
Update KeyArrayResult.java
2022-05-16 14:03:24 -07:00
Ray Jenkins 3edc3431fe Update go bindings. 2022-05-16 14:48:40 -05:00
imperatorx 5e01c171be
Update KeyArrayResult.java
Add missing getter
2022-05-16 20:02:36 +02:00
Clement Pang 89c5901228 make MappedKeyValue constructor public 2022-05-16 09:49:50 -07:00
Vaidas Gasiunas 194d5d99e3
Merge pull request #7157 from sfc-gh-vgasiunas/vgasiunas-fix-upgrade-test
Restoring checks after each step in upgrade test
2022-05-16 09:12:22 +02:00
Hao Fu 853e6a346b
Optimization: support removing index conditionally (#7116) 2022-05-13 10:10:43 -07:00
Vaidas Gasiunas 7c9a213127 Upgrade Tests: removing failing downgrade test to 7.1 2022-05-13 11:47:57 +02:00
Markus Pilman 452315ee78
Build mockkms and add mockkms test (#7153) 2022-05-12 15:07:02 -07:00
Vaidas Gasiunas 1992898323 Add a regression test to upgrade from 7.1 to 7.2 and downgrade back 2022-05-12 15:34:03 +02:00
Vaidas Gasiunas c84e0b0d7a
Merge pull request #7085 from sfc-gh-vgasiunas/vgasiunas-cluster-wiggle-test
Cluster wiggle test
2022-05-11 13:06:33 +02:00
Markus Pilman 524365083d
Merge pull request #7106 from sfc-gh-ahusain/ahusain-fdb-mock-kms
FDB native MockKMS REST server implementation
2022-05-10 09:10:54 -07:00
Markus Pilman e1ab0f5c4d
Merge pull request #7086 from sfc-gh-vgasiunas/vgasiunas-upgrade-tests-71
Upgrade Tests: Including 7.1 into the upgrade paths
2022-05-10 09:09:55 -07:00
Hao Fu 968c2cad43
Reduce workload in CycleMultiClientIntegrationTest (#7100) 2022-05-09 11:48:45 -07:00
Ata E Husain Bohra d6e5549226 FDB native MockKMS REST server implementation - Golang
Description

Major changes include:
1. FDB native MockKMS REST server implementation - Golang based.
2. Implements "getEncryptionKeys" endpoint utilized by
   FDB RESTKmsConnector module.
3. Ability to inject faults to induce errors at various points
   during query execution

NextSteps:

Need to integrate MockKMS to FDB build system.

Testing

1. Implements mockkms_test.go module providing extensive test coverage
   for newly added code.
2. Postman based local testing.
2022-05-07 20:53:13 -07:00
A.J. Beamon 68a46ca14d
Merge pull request #6852 from sfc-gh-jfu/jfu-list-tenants
Add listTenants commands to python and java bindings
2022-05-06 08:37:17 -07:00
Vaidas Gasiunas 27c0113305 Upgrade Tests: Including 7.1 into the upgrade paths 2022-05-06 15:21:57 +02:00
Vaidas Gasiunas fab8f35683 Cluster wiggle test 2022-05-06 15:00:40 +02:00
Vaidas Gasiunas 254da4d796
Merge pull request #7065 from sfc-gh-jslocum/arm_bg_fix
Fix for arm BG tests
2022-05-05 11:18:44 +02:00
Jon Fu c001d55c24 push tenant_list result as a packed tuple to stay consistent with other operations 2022-05-04 16:33:46 -04:00
Josh Slocum a7fdb42db8 Fix for arm BG tests 2022-05-04 14:54:16 -05:00
Jon Fu b5556c57f9 adjust instruction ordering in tenant_list api for binding tester 2022-05-04 13:59:19 -04:00
Jon Fu 9798e5fc83 Merge branch 'main' of github.com:apple/foundationdb into jfu-list-tenants 2022-05-04 12:49:43 -04:00
Jon Fu 96a35264b4 return tenant_list as one operation and validate with assertions 2022-05-04 12:48:48 -04:00
Hao Fu 97eb12381b
implement equals and hashCode in MappedKeyValue (#7041) 2022-05-03 12:24:26 -07:00
Hao Fu fa2e85f1d3
Add comment about getMappedRange parameters (#7044) 2022-05-02 15:17:14 -07:00
Rajiv Ranganath cf6e39af79 docs: add `GET_RANGE_SPLIT_POINTS`
Add `GET_RANGE_SPLIT_POINTS` instruction documentation.
2022-05-02 13:31:20 -07:00
Ray Jenkins dc9e782ccc
OpenTelemetry Tracing Perf Fixes (#6990) 2022-05-02 14:56:51 -05:00
Josh Slocum 57e1b487f1 Fixing ASAN alloc-dealloc-mismatch 2022-05-02 12:56:05 -05:00
Jon Fu ff216c2f57 add tenant list metadata to binding tester 2022-05-02 13:42:11 -04:00
Jon Fu d953b961b7 Merge branch 'main' of github.com:apple/foundationdb into jfu-list-tenants 2022-04-29 13:16:54 -04:00
Jon Fu 2afaf55a48 fixed some binding tests and split stack operation between key and value of tenant list 2022-04-29 13:16:04 -04:00
Josh Slocum 14e7738455 review comments 2022-04-27 16:08:00 -05:00
Josh Slocum 92da9d12d4 Improvements to fix 2022-04-27 16:08:00 -05:00
Josh Slocum 1bd72dc99e Allowing for blob granules to initialize at start of TesterBlobGranuleCorrectness 2022-04-27 16:08:00 -05:00
Vaidas Gasiunas 6f841446a5 API Tests: Enable client logs. Dump out the logs in case of an error 2022-04-27 10:02:20 -04:00
Vaidas Gasiunas d021b404ea ApiTester: Fix error code handing in case of a timeout 2022-04-27 10:02:20 -04:00
Junhyun Shim 1ee7702779
Merge pull request #6489 from sfc-gh-jshim/mako-cpp-async
Refactor Mako for C++ and add asynchronous execution support
2022-04-27 10:49:21 +02:00
Junhyun Shim 2f9506f5cd Introduce hard cap to latency sampling & apply clang format 2022-04-26 11:19:48 +02:00
Junhyun Shim 81211989f1 Disable new sample collection after first bad_alloc
- Add more info to --async_xacts description
- Clean up unused macro in fdb_api.hpp
2022-04-26 10:54:39 +02:00
Jon Fu a5e52c9450 Merge branch 'main' of github.com:apple/foundationdb into jfu-list-tenants 2022-04-25 14:56:20 -04:00
Ray Jenkins 1c5bf135d5
Revert "Migrate to OpenTelemetry tracing. (#6855)" (#6941)
This reverts commit 5df3bac110.
2022-04-25 09:29:56 -05:00
Junhyun Shim 81f9279db2 Fix GCC error about memset-ing atomic vars 2022-04-25 15:09:29 +02:00
Junhyun Shim d431a9f11b Wrap platform-specific PATH_MAX header in another 2022-04-25 13:53:05 +02:00
Junhyun Shim c4ac1ab9d0 Fix SGETRANGE 2022-04-25 13:24:56 +02:00
Junhyun Shim cfdff223ff Merge remote-tracking branch 'origin/main' into mako-cpp-async 2022-04-25 13:21:14 +02:00
Junhyun Shim 3536cab730 Apply clang format 2022-04-25 10:48:11 +02:00
Junhyun Shim 6224ea834b Emulate mako.c's commit behavior during populate() 2022-04-25 10:44:20 +02:00
Junhyun Shim 3205fe8ca4 Fix key selector handling
Also match selectors for OP_(S)GETRANGE
Add Transaction::getKey()
2022-04-22 22:31:32 +02:00
Vaidas Gasiunas 1064035c46 Update generated.go to include the client_tmp_dir option 2022-04-22 14:33:18 +02:00
Vaidas Gasiunas bc0096683f Remove an unused class member 2022-04-22 14:14:09 +02:00
Vaidas Gasiunas 9897712307 Merge remote-tracking branch 'apple/main' into vgasiunas-client-tmp-dir 2022-04-22 13:00:09 +02:00
Vaidas Gasiunas f9cb9deb1d Use build-local temp directory for C API tests 2022-04-22 11:57:29 +02:00
Vaidas Gasiunas caaf43da12
Merge pull request #6900 from sfc-gh-jslocum/bg_client_api_tests
Blob granule client API tests
2022-04-22 09:21:31 +02:00
Jon Fu 9e79ff49a6 address code review comments and add more places for test code 2022-04-21 16:58:32 -04:00
Vaidas Gasiunas b4fa9e23f6 Upgrade Tests: Use build local tmp directory for temp client library copies 2022-04-21 19:27:19 +02:00
Junhyun Shim c27635f607 Apply changes made to mako.c in main branch 2022-04-21 13:53:28 +02:00
Vaidas Gasiunas abbc047e5f Upgrade Tests: Dump entire log in case of errors 2022-04-21 10:12:25 +02:00
Junhyun Shim 7304c337f8 Aggressive inlining 2022-04-21 08:32:12 +02:00
Ivan Goncharov a2a7b959a5 Update bindings/c/CMakeLists.txt
Co-authored-by: Andrew Noyes <andrew.noyes@snowflake.com>
2022-04-20 15:56:18 -05:00
imorph 7a46d8b9cd Add new c libs to client package
Fixes: #6822
2022-04-20 15:56:18 -05:00
Josh Slocum 3c036300cc Addressing review comments 2022-04-20 14:34:19 -05:00
Junhyun Shim 3f9f781226 Fix typo 2022-04-20 19:41:07 +02:00
Binglin Chang 408c0cf1c9
Fix compile errors on ubuntu 20.04 (#4931) 2022-04-20 10:00:46 -07:00
Josh Slocum 40052c1394 Added Blob Granule API Tester 2022-04-20 10:15:43 -05:00
Josh Slocum 8fa25aa013 Adding blob granule client test target and local cluster setup 2022-04-20 10:15:43 -05:00