Commit Graph

138 Commits

Author SHA1 Message Date
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 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
Junhyun Shim 738a101a58 Add test for fdbcli's coordinator TLS suffix check 2022-09-05 19:27:22 +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
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
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
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
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
A.J. Beamon 7dee9fb4fd Add a test for the new JSON output 2022-06-27 12:34:40 -07: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
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 c001d55c24 push tenant_list result as a packed tuple to stay consistent with other operations 2022-05-04 16:33:46 -04:00
Jon Fu 96a35264b4 return tenant_list as one operation and validate with assertions 2022-05-04 12:48:48 -04:00
Jon Fu ff216c2f57 add tenant list metadata to binding tester 2022-05-02 13:42:11 -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
Jon Fu 9e79ff49a6 address code review comments and add more places for test code 2022-04-21 16:58:32 -04:00
Jon Fu c0aa361885 add TENANT_LIST to existing tests 2022-04-13 16:25:01 -04:00
Aaron Molitor 5ba8b82ba6 update version to 7.2.0 -- address pr comments 2022-04-11 23:23:27 -05:00
Aaron Molitor cbaef8f03b update version to 7.2.0 2022-04-11 23:23:27 -05:00
Lukas Joswiak 73a7c32982
Add fdbcli command to read/write version epoch (#6480)
* Initialize cluster version at wall-clock time

Previously, new clusters would begin at version 0. After this change,
clusters will initialize at a version matching wall-clock time. Instead
of using the Unix epoch (or Windows epoch), FDB clusters will use a new
epoch, defaulting to January 1, 2010, 01:00:00+00:00. In the future,
this base epoch will be modifiable through fdbcli, allowing
administrators to advance the cluster version.

Basing the version off of time allows different FDB clusters to share
data without running into version issues.

* Send version epoch to master

* Cleanup

* Update fdbserver/storageserver.actor.cpp

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

* Jump directly to expected version if possible

* Fix initial version issue on storage servers

* Add random recovery offset to start version in simulation

* Type fixes

* Disable reference time by default

Enable on a cluster using the fdbcli command `versionepoch add 0`.

* Use correct recoveryTransactionVersion when recovering

* Allow version epoch to be adjusted forwards (to decrease the version)

* Set version epoch in simulation

* Add quiet database check to ensure small version offset

* Fix initial version issue on storage servers

* Disable reference time by default

Enable on a cluster using the fdbcli command `versionepoch add 0`.

* Add fdbcli command to read/write version epoch

* Cause recovery when version epoch is set

* Handle optional version epoch key

* Add ability to clear the version epoch

This causes version advancement to revert to the old methodology whereas
versions attempt to advance by about a million versions per second,
instead of trying to match the clock.

* Update transaction access

* Modify version epoch to use microseconds instead of seconds

* Modify fdbcli version target API

Move commands from `versionepoch` to `targetversion` top level command.

* Add fdbcli tests for

* Temporarily disable targetversion cli tests

* Fix version epoch fetch issue

* Fix Arena issue

* Reduce max version jump in simulation to 1,000,000

* Rework fdbcli API

It now requires two commands to fully switch a cluster to using the
version epoch. First, enable the version epoch with `versionepoch
enable` or `versionepoch set <versionepoch>`. At this point, versions
will be given out at a faster or slower rate in an attempt to reach the
expected version. Then, run `versionepoch commit` to perform a one time
jump to the expected version. This is essentially irreversible.

* Temporarily disable old targetversion tests

* Cleanup

* Move version epoch buggify to sequencer

This will cause some issues with the QuietDatabase check for the version
offset - namely, it won't do anything, since the version epoch is not
being written to the txnStateStore in simulation. This will get fixed in
the future.

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2022-04-08 12:33:19 -07:00
Chaoguang Lin 7d365bd1bb
Remote ikvs debugging (#6465)
* initial structure for remote IKVS server

* moved struct to .h file, added new files to CMakeList

* happy path implementation, connection error when testing

* saved minor local change

* changed tracing to debug

* fixed onClosed and getError being called before init is finished

* fix spawn process bug, now use absolute path

* added server knob to set ikvs process port number

* added server knob for remote/local kv store

* implement simulator remote process spawning

* fixed bug for simulator timeout

* commit all changes

* removed print lines in trace

* added FlowProcess implementation by Markus

* initial debug of FlowProcess, stuck at parent sending OpenKVStoreRequest to child

* temporary fix for process factory throwing segfault on create

* specify public address in command

* change remote kv store knob to false for jenkins build

* made port 0 open random unused port

* change remote store knob to true for benchmark

* set listening port to randomly opened port

* added print lines for jenkins run open kv store timeout debug

* removed most tracing and print lines

* removed tutorial changes

* update handleIOErrors error handling to handle remote-ikvs cases

* Push all debugging changes

* A version where worker bug exists

* A version where restarting tests fail

* Use both the name and the port to determine the child process

* Remove unnecessary update on local address

* Disable remote-kvs for DiskFailureCycle test

* A version where restarting stuck

* A version where most restarting tests green

* Reset connection with child process explicitly

* Remove change on unnecessary files

* Unify flags from _ to -

* fix merging unexpected changes

* fix trac.error to .errorUnsuppressed

* Add license header

* Remove unnecessary header in FlowProcess.actor.cpp

* Fix Windows build

* Fix Windows build, add missing ;

* Fix a stupid bug caused by code dropped by code merging

* Disable remote kvs by default

* Pass the conn_file path to the flow process, though not needed, but the buildNetwork is difficult to tune

* serialization change on readrange

* Update traces

* Refactor the RemoteIKVS interface

* Format files

* Update sim2 interface to not clog connections between parent and child processes in simulation

* Update comments; remove debugging symbols; Add error handling for remote_kvs_cancelled

* Add comments, format files

* Change method name from isBuggifyDisabled to isStableConnection; Decrease(0.1x) latency for stable connections

* Commit the IConnection interface change, forgot in previous commit

* Fix the issue that onClosed request is cancelled by ActorCollection

* Enable the remote kv store knob

* Remove FlowProcess.actor.cpp and move functions to RemoteIKeyValueStore.actor.cpp; Add remote kv store delay to avoid race; Bind the child process to die with parent process

* Fix the bug where one process starts storage server more than once

* Add a please_reboot_remote_kv_store error to restart the storage server worker if remote kvs died abnormally

* Remove unreachable code path and add comments

* Clang format the code

* Fix a simple wait error

* Clang format after merging the main branch

* Testing mixed mode in simulation if remote_kvs knob is enabled, setting the default to false

* Disable remote kvs for PhysicalShardMove which is for RocksDB

* Cleanup #include orders, remove debugging traces

* Revert the reorder in fdbserver.actor.cpp, which fails the gcc build

Co-authored-by: “Lincoln <“lincoln.xiao@snowflake.com”>
2022-03-31 17:08:59 -07:00
A.J. Beamon 48447c2788 Add the tenant management module to CMakeLists. Don't test tenants before API version 710. 2022-03-25 14:35:16 -07:00
A.J. Beamon b4cfcc10d3 Move Python tenant management to its own module 2022-03-25 11:36:35 -07:00
A.J. Beamon 77ce0f4fc7 Add a unit test in Python to exercise some of the tenant code. Add some comments to the allocate and delete tenant implementations. 2022-03-23 15:50:06 -07:00
A.J. Beamon 8b92d3fccd Use special keys to create/delete tenants 2022-03-23 14:46:56 -07:00
Jon Fu 8e848f16df Support tuples in python tenants 2022-03-23 14:46:55 -07:00
A.J. Beamon ce03f5783d Add tenant support to Python 2022-03-23 14:46:55 -07:00
A.J. Beamon 3f7365c433 Remove test debugging lines 2022-03-21 10:23:22 -07:00
A.J. Beamon a23add6bc4 Add fdbcli test for tenants. Add documentation for new fdbcli tenant commands. Various output cleanup. Fix limit parsing bug in listtenants command. Update gettenant output format. 2022-03-17 12:10:39 -07:00
Andrew Noyes 96cbfe668c
Fix flaky ctest tests (#6310)
* Use localhost cluster for trace_partial_file_suffix_test

This way we get a predictable 127.0.0.1 in the trace file name

* Skip suspend test of pidof is not available

* Avoid writing to closed trace log

calling fdb_network_stop sends a "close" message to the trace thread,
but the network thread might can still be running and sending "flush"
messages to the network thread. This change basically ignores any
flushes that come after a close.

* Ensure unique ports for multi-process tests
2022-01-28 13:16:44 -08:00
Chaoguang Lin 3dad130e72 Disable setclass test for now 2022-01-26 16:42:13 -08:00
Ray Jenkins d3055cc59a Use single transaction for setProcessClass and add fdbcli unit test. 2022-01-24 13:32:44 -08:00
Andrew Noyes 32ebdc6da2 Log status json if cluster is unavailable in fdbcli tests 2021-12-22 15:23:05 -08:00
Andrew Noyes 1ce9c0faed Add sleep 1 after killing/suspending a process
So that it's more likely to actually deliver the message
2021-12-08 16:44:03 -08:00
Chaoguang Lin e2fa511036 Add option --api-version for fdbcli 2021-10-05 13:00:28 -07:00
Chaoguang Lin 0b9f32a7d2 Remove the unnecessary check in the end of setclass 2021-08-25 14:50:52 -07:00
Chaoguang Lin a1c8217260 Move setclass test from single-process_test to multi-process_test 2021-08-25 13:04:01 -07:00
Chaoguang Lin b6dc20875e Add test coverage for triggerddteaminfolog command 2021-08-25 10:39:00 -07:00
Chaoguang Lin b00cefc243 Add a safe wait in the fdbcli setclass test 2021-08-25 10:38:01 -07:00
Chaoguang Lin 6b01363f45 Remove commented test; fix issues 2021-08-25 10:29:48 -07:00
Chaoguang Lin ec1fcfba57 Add test coverage for profile command 2021-08-25 10:04:22 -07:00
Chaoguang Lin 68b41392a0 Change to use ArgumentParser, set env to use external client library in Popen, enable logging in all tests 2021-08-19 12:13:26 -07:00
Chaoguang Lin 775ac3e27c Format fdbcli_tests.py file 2021-08-17 10:15:35 -07:00