Commit Graph

2047 Commits

Author SHA1 Message Date
A.J. Beamon b40abf3ec0 Apply flake8 2022-11-30 15:45:39 -08:00
A.J. Beamon ed9acd550e Properly generate operations with the _TENANT suffix.
Add atomic op functions to the tenant object in Python.
Fix a Python tester bug for tenant operations.
Fix a build error with the binding tester package.
2022-11-30 15:30:10 -08:00
Jingyu Zhou edc4f69322
Merge pull request #8910 from sfc-gh-ajbeamon/bindingtester-add-missing-tenant-commands
Allow the binding tester API test to generate reads and writes on tenant objects
2022-11-28 09:27:01 -08:00
Vaidas Gasiunas 493ab95464
Define the old FDB release versions used for client testing in one place (#8888)
* Auto-formatting fdb_c_shim_tests.py

* Define the old release versions used for testing in one place; Using PYTHONPATH to find python modules from other project directories

* Remove obsolete upgrade tests; add direct upgrade tests from older versions

* Trigger tests
2022-11-25 13:16:33 +01:00
A.J. Beamon 33a503424d Allow the binding tester API test to generate reads and writes on the tenant object (using the _TENANT suffix) 2022-11-22 14:31:36 -08:00
Junhyun Shim 72b4dc9852 Make client tests run in venv 2022-11-22 18:20:28 +01:00
A.J. Beamon 4a6b29deff
Merge pull request #8871 from LukasMoll/flake8-bindings-python-tests
bindings/python/tests Applied flake8
2022-11-21 09:22:41 -08:00
sfc-gh-tclinkenbeard 453f3f44c6 Merge remote-tracking branch 'origin/main' into expose-tag-throttled-duration 2022-11-21 09:17:48 -08:00
Marian Dvorsky f7d1310d0d
Suppress LSAN leak reports from ConnectionReaderActorState (#8889) 2022-11-21 17:58:22 +01:00
Junhyun Shim a4157e0c51 Expose TokenSign as a public library to be used by Mako 2022-11-21 14:33:45 +01:00
Lukas Molleman f57c977d73 bindings/python/tests Applied flake8 2022-11-21 12:08:53 +01:00
Johannes Scheuermann f40b8da3e9
Allow to close database in go bindings (#8793)
* Allow to close database in go bindings
2022-11-19 09:38:10 +01:00
A.J. Beamon 877a9388b8
Merge pull request #8748 from LukasMoll/bindings-python-fdb-flake8
/bindings/python/fdb Applied flake8
2022-11-18 08:41:18 -08:00
Ankita Kejriwal 3036f2458f
Merge pull request #8803 from sfc-gh-akejriwal/commitproxies
Add a transaction option to bypass storage quota enforcement
2022-11-15 15:22:11 -08:00
sfc-gh-tclinkenbeard d1529aafaf Mark proxy_tag_throttled error retryable 2022-11-15 15:00:39 -08:00
Ankita Kejriwal 08c9ee7198 Update the generated.go file with the new option 2022-11-15 11:57:35 -08:00
LukasMoll f780ed33d8
Merge branch 'main' into bindings-python-fdb-flake8 2022-11-15 09:08:23 +01:00
Dennis Zhou 6a86369097
apitester: add better support for blob api commands + tenant abstraction (#8700)
* blob/apitester: rename tenantDebugString() -> debugTenantStr()

* blob/apitester: fix int64_t initialization to -1

* blob/apitester: add missing override for randomOperation()

* blob/cpp: cpp blob tenant operations

* apitester: add tenant to execution context

* apitester: DatabaseOps abstraction

This creates a base abstract class for Database and Tenant operations to
share.

* blob/apitester: add setup phase to verifyRange() prior to operations

This let's us ensure blob storage is setup prior to running apitester
against the cluster.

* apitester: expand execOperation() to take a tenant

Now that db operations can be transparently applied to tenants or
databases through the IDatabaseOps interface, allow execOperation() to
take a tenant accordingly.

* blob/testerapi: blobbify in TesterApiWorkload setup

Before we were blobbifying wholesale through TestRunner. This makes the
change to blobbifying and verifying in setup, so the workload can
properly test database and tenant scope functions.
2022-11-14 10:49:51 +01:00
sfc-gh-tclinkenbeard 7fc85d86b4 Add fdb_transaction_get_tag_throttled_duration function to C bindings 2022-11-13 11:22:57 -08:00
Vaidas Gasiunas b5182dc43f
Define client config tests as python unit tests (#8791) 2022-11-11 15:59:18 +01:00
Christian Wende 502652d5f9
Mako: Add Timeout Support (#8718)
* Mako: Add Timeout Support

* Mako: Change log levels, do not count timeouts as errors, and add function that checks if error is expected for async run mode

* Mako: Fix formatting
2022-11-10 14:04:45 +01:00
Vaidas Gasiunas 0160570c2a
Failing client initialization on errors in external clients; Update package version to 7.3.0 (#8719)
* Network setup to fail on the initialization failures of external clients

* MVC: A more intuitive error when failing to load an API function

* Testing initializing FDB client with different configuration options

* Enable strict external client configuration check only for new API versions

* Upgrade FDB package version to 7.3.0; Update upgrade tests
2022-11-10 13:01:41 +01:00
Vaidas Gasiunas 37420c7c72
API Tests: Fix atomic operations workload for tests with restarts on timeouts (#8749)
* run_c_api_tests an option to disable log dump

* ApiTester: Utility for self-conflicting transactions

* ApiTester: A reusable code for making write transactions self-conflicting; Make atomic operation transactions self-conflicting
2022-11-10 10:23:28 +01:00
Lukas Molleman 3bf017d59a C:/Program Files/Git/bindings/python/fdb/ Applied flake8 2022-11-09 20:43:43 +01:00
Junhyun Shim ab6acd7752 Update go bindings option file with go 1.19 2022-11-09 15:37:19 +01:00
Jingyu Zhou 010dcb8f81
Merge pull request #8690 from LukasMoll/bindings-bindingtester-flake8
/bindings/bindingtester/ Applied flake8
2022-11-07 09:16:10 -08:00
Jingyu Zhou 79818c28dd
Merge pull request #8691 from LukasMoll/bindings-c-flake8
/bindings/c/ Applied flake8
2022-11-07 09:15:47 -08:00
Christian Wende 4b66b0e4ef
Mako: Initialize Arguments::num_report_files to 0 (#8717) 2022-11-07 16:28:17 +01:00
Vaidas Gasiunas ce3038bfe5
Use a network option for retaining temporary client lib copies instead of a client knob (#8630) 2022-11-07 14:46:17 +01:00
Christian Wende d3cf71ece0
Fix unintended behavior in Mako (#8635)
* Fix errors statistic in sync mode

* Fix error statistics and restart behavior in async mode

* Fix #iterations stopping criterion

* Prevent edge cases with regards to target tps and iteration specification

* Fix mistake in async logic

* fix throttling and add one more case to validation

* small changes

* Mako: Remove unnecessary force_inline's and small change to header include statement

* Mako: Replace `auto err = fdb::Error{}`

* Mako: Move error statistics updates into future.hpp

* Mako: Async: Rename restartIteration -> onIterationEnd

* Mako: Move transaction creation in sync mode

* Mako: Clean up future.hpp by moving stats updates out of it
2022-11-07 10:44:19 +01:00
Lukas Molleman c87b6ba48b revert sys.path placement 2022-11-04 21:32:21 +01:00
Lukas Molleman 87d28dd28c revert sys.path placement 2022-11-04 21:27:07 +01:00
Lukas Molleman 2b8c1845a2 C:/Program Files/Git/bindings/c/ Applied flake8 2022-11-03 22:08:13 +01:00
Lukas Molleman ced2557be5 C:/Program Files/Git/bindings/bindingtester/ Applied flake8 2022-11-03 22:01:34 +01:00
Vaidas Gasiunas 18b852c4e4
Improving troubleshooting of stopping the FDB client thread (#8629)
* Upgrade tests: dump thread call stacks of the tester process if it fails to terminate

* ApiTester: log before and after stopping the network thread

* Catch and print exceptions in closeTraceFile; Close trace file at the end of MVC runNetwork

* Change trace event name for MVC runNetwork termination

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2022-11-03 13:20:21 +01:00
Christian Wende a335fb85c0
Fix segmentation fault when parsing json path in Mako (#8650)
* Made parsing of ARG_JSON_PATH similar to parsing of ARG_EXPORT_PATH

* Mako: Fix passing optional arguments
2022-11-02 12:39:07 +01:00
Josh Slocum e48135086e refactoring check for summarize op to use existing validation 2022-11-01 13:56:11 -07:00
Josh Slocum 55acc27bd3 fixing bug for tenant-aware reads 2022-11-01 13:56:11 -07:00
Josh Slocum f02fd406b4 bg api tester: better debugging on errors, and added verbose debugging mode 2022-11-01 13:56:11 -07:00
Trevor Clinkenbeard 39abc712b0
Merge pull request #8549 from sfc-gh-tclinkenbeard/expose-txn-cost
Create `fdb_transaction_get_total_cost` function
2022-11-01 08:14:57 -07:00
Josh Slocum fa80d7bfde
Blobbifiyng tenants in mako so that blob granule reads in tenant mode work (#8587)
* Blobbifiyng tenants in mako so that blob granule reads in tenant mode work

* removing unecessary comment
2022-10-31 18:08:29 -05:00
Lukas Molleman 76197540dc Applied flake8 2022-10-31 19:19:17 +01:00
A.J. Beamon 0091abd02b
Merge pull request #8491 from LukasMoll/pep-8
Applied flake8 rules to 2 python files
2022-10-31 09:53:08 -07:00
sfc-gh-tclinkenbeard 317f17df89 Added fdb_transaction_get_total_cost test 2022-10-30 14:32:58 -07:00
sfc-gh-tclinkenbeard 0eb1598afa Merge remote-tracking branch 'origin/main' into expose-txn-cost 2022-10-30 09:36:37 -07:00
Vaidas Gasiunas c6adb3a98c
Building fdb_c_shim to a shared library (#8586) 2022-10-27 12:37:20 +02:00
sfc-gh-tclinkenbeard 1c119be26d Merge remote-tracking branch 'origin/main' into expose-txn-cost 2022-10-25 13:50:43 -07:00
Junhyun Shim ade4cb6b72 Merge remote-tracking branch 'origin/main' into enable-authz-benchmark-in-mako 2022-10-25 22:42:24 +02:00
Junhyun Shim 33c8a80614 Update Mako documentation for authz/TLS enablement 2022-10-25 16:13:01 +02:00
Junhyun Shim e32affc9f0 Add TLS and token file option to mako 2022-10-25 15:58:20 +02:00
Andrew Noyes 91671abcd3 Update generated.go 2022-10-24 10:22:29 -07:00
sfc-gh-tclinkenbeard 32ae7bb529 Merge remote-tracking branch 'origin/main' into expose-txn-cost 2022-10-23 12:59:07 -07:00
Vaidas Gasiunas 4d6ff720fe
Check network thread error in API and unit tests (#8528) 2022-10-21 13:32:06 +02:00
Vaidas Gasiunas 70311ee26e
ApiTester: include server configuration, separate ctest for every test file (#8499)
* ApiTester: Include server configuration into TOML files

* ApiTests: Generate a separate ctest target for every API test file

* Fix upgrade test script after refactoring

* ApiTests: test with multiple processes. Limit TLS tests to a single process

* ApiTests: Reformat TOML files without indentation

* ApiTests: adding explicit dependencies on the relevant binaries to the ctest command
2022-10-21 11:53:35 +02:00
Kao Makino ee4ef59be5
Merge pull request #8503 from sfc-gh-zyang/zyang/FDBCORE-3200
support --load_factor
2022-10-19 20:51:29 -07:00
sfc-gh-zyang 5046b235a4 reformat 2022-10-19 11:48:27 -07:00
sfc-gh-zyang d7cb50d3db remove debug info, add comment, fix format error 2022-10-19 10:57:52 -07:00
Junhyun Shim cda6202a26
Disable delete-native-lib-after-loading client knob for some C API tests (#8501)
* Disable delete-on-sharedobj-load client knob

To have symbolized stack traces upon xSAN error reproduce

* Add knob support to run_c_api_tests.py

* Apply DELETE_NATIVE_LIB_AFTER_LOADING knob to all C API tests
2022-10-19 10:40:31 +02:00
sfc-gh-zyang a4e9b2e4aa fix typo 2022-10-18 17:32:25 -07:00
sfc-gh-zyang 35f7389b2a support load_factor 2022-10-18 17:03:44 -07:00
Lukas Molleman 4c45a11fbf applied flake8 rules 2022-10-17 22:19:12 +02:00
Dennis Zhou 4a04e503a6 blob/java: tenant purgeBlobGranules() java api 2022-10-17 11:42:27 -05:00
Dennis Zhou cfe62685e9 blob/java: tenant verifyBlobRange() java api 2022-10-17 11:42:27 -05:00
Dennis Zhou 77e2e4a381 blob/c: tenant verifyBlobRange() c api 2022-10-17 11:42:26 -05:00
Dennis Zhou 4cca9a8c70 blob/java: tenant listBlobbifiedRanges() java api 2022-10-17 11:42:08 -05:00
Dennis Zhou 9d38ddfabc blob/c: tenant listBlobbifiedRanges() c api 2022-10-17 11:42:07 -05:00
Dennis Zhou da94188570 blob/java: tenant (un)blobbify() java api 2022-10-17 11:41:45 -05:00
Dennis Zhou a0246caebb blob/c: tenant (un)blobbify() c api 2022-10-17 11:41:44 -05:00
sfc-gh-tclinkenbeard 00eead1d8d Add fdb_transaction_get_total_cost to C bindings 2022-10-16 21:58:11 -07:00
Sam Gwydir 0d2bf71f71
Add help for mako's --disable_client_bypass (#8476)
* Add help for --disable_client_bypass

* formatting
2022-10-14 16:41:47 -05:00
Jingyu Zhou df5825ff65
Merge pull request #8398 from sfc-gh-anoyes/anoyes/idempotency-id2
Initial work for automatic idempotency
2022-10-13 13:07:14 -07:00
Vaidas Gasiunas 5ca3606c7d
Add transaction timeout tests in ApiTester (#8412)
* ApiTester: test transaction timeout

* ApiTester: Turn off buggify for timeout tests

* ApiTester: Enable failure injection in timeout tests; make write transactions self-conflicting

* Consistently use 4 spaces instead of mixing with tabs

Co-authored-by: Andrew Noyes <andrew.noyes@snowflake.com>
2022-10-13 17:15:19 +02:00
Andrew Noyes bb7fb9b317 Regenerate go options 2022-10-11 13:46:39 -07:00
Josh Slocum b3c1add1a8 Merge branch 'main' into bg_fix_mako 2022-10-11 12:35:48 -05:00
Markus Pilman 4d9465a30b Disable java-workload in IDE-mode 2022-10-10 10:29:23 -06:00
Josh Slocum b704315465 fixing parameter to be bool 2022-10-10 09:30:16 -05:00
Josh Slocum 4ebe341e2c adding --disable_client_bypass to mako 2022-10-07 16:12:39 -05:00
Jingyu Zhou 767cb9b3e2
Merge pull request #8389 from sfc-gh-vgasiunas/vgasiunas-retry-dboperations
ApiTester: not creating transactions for DB operations; retrying without transactions
2022-10-07 10:00:43 -07:00
Vaidas Gasiunas 0e09978bde Merge remote-tracking branch 'apple/main' into vgasiunas-retry-dboperations 2022-10-07 09:14:36 +02:00
Andrew Noyes 75241092eb
Update bindings/c/test/fdb_api.hpp 2022-10-06 12:23:56 -07:00
Andrew Noyes caf881f222 Add addReadConflictRange 2022-10-06 12:03:51 -07:00
Andrew Noyes 51507aa454 Make ApiWorkload::clearData tx self-conflicting 2022-10-06 11:51:16 -07:00
Vaidas Gasiunas e3c3a64c78 ApiTester: use an existing API method to determine if an error is retriable 2022-10-06 16:20:58 +02:00
A.J. Beamon cfb36bd9c3 Support versionstamps in key backed object properties 2022-10-05 12:48:40 -07:00
Markus Pilman 550488b020 Merge remote-tracking branch 'origin/main' into bugfixes/open-for-ide
# Conflicts:
#	bindings/c/CMakeLists.txt
#	fdbclient/include/fdbclient/GetEncryptCipherKeys.actor.h
#	fdbserver/BackupWorker.actor.cpp
#	fdbserver/BlobWorker.actor.cpp
#	fdbserver/CommitProxyServer.actor.cpp
#	fdbserver/KeyValueStoreMemory.actor.cpp
#	fdbserver/StorageCache.actor.cpp
#	fdbserver/include/fdbserver/GetEncryptCipherKeys.actor.h
#	fdbserver/storageserver.actor.cpp
#	fdbserver/workloads/PhysicalShardMove.actor.cpp
#	flow/CMakeLists.txt
2022-10-04 18:27:48 -06:00
Markus Pilman 97dfc6823f fixed build with OPEN_FOR_IDE 2022-10-04 17:01:02 -06:00
Vaidas Gasiunas 5d6cb4d3dd ApiTester: Fix handling retries of DB operations 2022-10-04 17:30:11 +02:00
A.J. Beamon b50276ff5a
Merge pull request #8358 from sfc-gh-ajbeamon/bindingtester-fixes
Fix some binding tester issues
2022-10-03 13:50:19 -07:00
Vaidas Gasiunas 415e1aeb1f
Fix for a memory leak in database operations called after create database errors (#8334)
* ApiTester: cancel pending futures for non-transactional operations

* Clear future callback in case of abort signal to avoid memory leaks

* Abortable future: Make sure all callbacks are cleared in case of premature signal; addressing comments

* Abortable future: remove debugging asserts

* Abortable future: restore the previous method for cancelling wrapped future

* Removing debugging code
2022-10-01 11:30:52 +02:00
A.J. Beamon 8b5c6c83cd The Java binding tester shouldn't swallow Context errors; fix an assertion failure caused by incorrect management of the transaction map; remove some unneeded output from binding tester runs 2022-09-29 12:30:04 -07:00
Josh Slocum f95c22c6a2
Blob Granule Database API tests (#8276)
* adding verify

* Adding error test cases

* more fixes to bg api tests
2022-09-26 11:15:10 +02:00
A.J. Beamon 2e41eb8a4a Move fdbcli tests into the fdbcli directory 2022-09-22 16:05:56 -07:00
A.J. Beamon 97a325adab Add an fdbcli command to get tenant group metadata 2022-09-22 13:24:21 -07:00
A.J. Beamon 41993c41fd
Merge pull request #8271 from sfc-gh-ajbeamon/fdbcli-updated-tenant-command
Convert fdbcli tenant commands to a single command with subcommands
2022-09-22 10:31:53 -07:00
Jon Fu 7a09b701cc
Merge pull request #8141 from sfc-gh-jfu/network-disable-bypass
Introduce network option for disabling mvc bypass
2022-09-21 17:33:48 -07:00
A.J. Beamon 64c8e0e2b1 Convert fdbcli tenant commands to a single command with subcommands. Update the structure of fdbcli tenant tests. 2022-09-21 16:22:58 -07:00
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