Commit Graph

553 Commits

Author SHA1 Message Date
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
Yi Wu 994b8c92f8
Add option to limit resident memory and remove default memory limit (#6719)
Changing `memory` option to limit resident memory instead of virtual memory, in config file and fdbserver/fdbbackup/fdbcli command-line argument. Since `rlimit` doesn't support limiting virtual memory, the current implementation have both of fdbmonitor and the fdbserver/fdbbackup process checking process RSS periodically and kill and restart the process if the limit is exceeded.

Adding a new `memory_vsize` option to limit virtual memory, if backward-compatible behavior is desired.

closes #6671, closes #6672
2022-04-06 20:06:24 -07:00
Jingyu Zhou f68fd28d73 Refactor duplicated code into IKnobCollection::setupKnobs() 2022-04-05 02:06:38 -07:00
A.J. Beamon 23fcd8c076 Fix issues with command completion for exclude and storage_migration_type. Add missing documentation for tenant_mode in one spot. 2022-03-29 09:07:33 -07:00
Josh Slocum f27475e2f4 Merge branch 'main' into blob_integration 2022-03-22 11:41:58 -05:00
sfc-gh-tclinkenbeard a71099471b Update copyright header dates 2022-03-21 13:36:23 -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
A.J. Beamon f8cddd3842 Add fdbcli support for tenants 2022-03-17 12:10:39 -07:00
Josh Slocum e71b3533f9 Merge branch 'main' into blob_integration 2022-03-09 08:59:56 -06:00
Jingyu Zhou 1a5bf25b5c Update code base to use fmt 8.1.1 2022-03-04 15:52:06 -08:00
Renxuan Wang 233c918ffb Replace printf() and fprintf() with fmt::print(). 2022-02-25 19:06:57 -08:00
Renxuan Wang f7eb66441d Try eliminating warnings in macOS and Windows CI builds.
MacOS warnings are format warnings, e.g., `format specifies type 'long' but the argument has type 'Version' (aka 'long long')`.
Windows warnings are `ACTOR does not contain a wait() statement`.
2022-02-25 19:06:57 -08:00
A.J. Beamon 250a88e682 Enforce that trace event suppression calls happen first when using trace event call chaining. Fix various instances where we weren't following this requirement. 2022-02-24 12:25:52 -08:00
Renxuan Wang 622d89b552 Rebase on main.
Since we changed ClusterConnectionString's status flag from boolean to enum in #6422, we need to update this PR correspondingly.
2022-02-22 16:29:59 -08:00
Renxuan Wang 481587a8c6 Turn on hostname logic. 2022-02-22 16:29:59 -08:00
Josh Slocum 38a75a8b89 Merge branch 'main' into blob_integration 2022-02-17 17:47:38 -06:00
Renxuan Wang e962d8184c Remove the deprecated code.
They were deleted in #5593 but accidentally added back in #5589.
2022-02-08 17:01:29 -08:00
A.J. Beamon 65f2c14f31
Merge pull request #6320 from johscheuer/add-fdbcli-loggroup
Add LogGroup support to fdbcli
2022-02-01 09:13:18 -08:00
Johannes M. Scheuermann 3b0feebd5d Add LogGroup support to fdbcli 2022-01-31 17:47:39 +00:00
A.J. Beamon 2a83e99d6f Support other output streams in fdbcli printAtCol 2022-01-26 14:50:23 -08:00
A.J. Beamon ff1cb58174 Convert hyphens to underscores for all prefix-based arguments (e.g. --knob-, --locality-) 2021-12-14 12:01:44 -08:00
A.J. Beamon f29f487823
Unify flags (#25)
* Unify flags implementation and change help text in backup.actor.cpp
Description

Testing

* Keep LOG_GROUP unchanged

Description

Testing

* Transfer the hyphens to underscores for internal options and user's input, EXCEPT leading hyphens

Description

Testing

* Use a deep copy of the user's input flag to do the match

Description

Testing

* Convert the _ to - in Option arrays of backup.actor.cpp

Description

Testing

* Transter _ to - for files:
        TLSConfig.actor.h, fdbcli.actor.cpp, fdbserver.actor.cpp, FileConverter.h, FileConverter.cpp

Description

Testing

* Change another way to unify flag: using SO_O_ICASE_HYPHEN_AND_UNDERSCORE to determine whether we do the conversion in function IsEqual

Description

Testing

* Change the config command's name from SO_O_ICASE_HYPHEN_AND_UNDERSCORE to SO_O_HYPHEN_TO_UNDERSCORE

Description

Testing

* Update the comment for the SO_O_HYPHEN_TO_UNDERSCORE

Description

Testing

* Fix left underscore in SOption arrays

Description

Testing

* Convert _ to - in several files for commands

Description

Testing

* Make the FDBService and fdbmonitor backward compatible

Description

Testing

* Fix bugs about pointers

Description

Testing

* Check underscore and hyphen at the same time for --knob_, --localily_ and --test_
And fix bugs in fdbmonitor and FDBService
Description

Testing

* Simplify the function in fdbmonitor and FDBService about retrieving arguments.
And fix some documents in masterserver.actor.cpp

Description

Testing

* Convert _ to - for knob in the setKnob functions

Description

Testing

* Convert - to _ in the setKnob functions

Description
Since key in the knob related maps only contain _

Testing

* Rename varialbe name in the fdbmonitor and FDBService for clarification

Description

Testing

Co-authored-by: Chang Liu <chang.liu@snowflake.com>
2021-12-14 08:44:39 -08:00
Suraj Gupta cb568bbd55 Add watch on config key. 2021-12-10 14:00:34 -06:00
sfc-gh-tclinkenbeard ec64890ac1 Remove some usages of PRId64 by using fmt library 2021-11-30 23:35:36 -08:00
sfc-gh-tclinkenbeard 3b1ae39403 Add CLIOptions::setupKnobs method 2021-11-16 10:39:22 -08:00
sfc-gh-tclinkenbeard deb0eb85e8 Initialize global flow knobs in setupNetwork 2021-11-16 00:41:34 -08:00
Josh Slocum 0ff8ddc2b6 Merge branch 'master' into blob_full_clean 2021-10-25 13:38:48 -05:00
Evan Tschannen 6f7558b8ea Merge branch 'master' of https://github.com/apple/foundationdb into feature-range-feed
# Conflicts:
#	tests/CMakeLists.txt
2021-10-24 21:06:33 -07:00
A.J. Beamon e882eb33fc Abstract the cluster file into a cluster connection record that can be backed by something other than the filesystem. 2021-10-22 11:05:18 -07:00
Josh Slocum 773886515e Merge branch 'feature-range-feed' into blob_full_clean 2021-10-22 11:07:51 -05:00
Evan Tschannen 3f7df58a77 fixed a number of issues 2021-10-19 13:56:52 -07:00
Josh Slocum 5f0ec0612a Merge branch 'feature-range-feed' into blob_full 2021-10-13 15:44:35 -05:00
Evan Tschannen d51edf18dc fixed merge conflicts 2021-10-09 19:47:24 -07:00
Evan Tschannen 5c642f706e Merge branch 'master' of https://github.com/apple/foundationdb into feature-range-feed
# Conflicts:
#	fdbcli/fdbcli.actor.cpp
2021-10-09 19:34:16 -07:00
Chaoguang Lin e2fa511036 Add option --api-version for fdbcli 2021-10-05 13:00:28 -07:00
Neethu Haneesha Bingi 3e79299898 Locality filter support to perpetual storage wiggler feature. 2021-09-30 10:00:33 -07:00
Xiaoxi Wang 1730d75f73 change configure test
add store type check
add test file
2021-09-21 18:11:04 -07:00
Chaoguang Lin c6b572dc06 Add makeInterruptable to commands' actors 2021-09-21 10:06:04 -07:00
Chaoguang Lin a6940c6061 Change the return type of triggerddteaminfologCommandActor to bool to make it consistent with others 2021-09-21 10:06:04 -07:00
Chaoguang Lin a871a9fac6 Refactor fileconfigure command 2021-09-21 10:06:04 -07:00
Chaoguang Lin 65956ae6b7 Refactor configure command; refactor changeConfig to template code to reuse existing tests 2021-09-21 10:06:04 -07:00
Xiaoge Su abf73047ca Enforce std:: specifier rather than using namespace 2021-09-16 19:40:28 -07:00
Chaoguang Lin 6cca6b9e6f Refactor exclude command 2021-09-14 11:04:02 -07:00
Chaoguang Lin ff54ba8626 Refactor coordinators and include command 2021-09-14 11:04:02 -07:00
Josh Slocum 9992a7b33f Added StorageMigrationType and cli commands 2021-09-14 09:55:41 -05:00
Chaoguang Lin cb9dde358c Solve comments, refatctor the error handling part 2021-09-13 13:28:48 -07:00
Chaoguang Lin cfb9b56067 Refactor lock/unlock command, fix the related correctness test, add the documentation for updating usage of the special key 2021-09-13 13:28:48 -07:00
Josh Slocum c2d1d1704f Merge branch 'feature-range-feed' into blob_full 2021-09-10 11:21:52 -05:00
Evan Tschannen ac5b580e2d Merge branch 'master' into feature-range-feed
# Conflicts:
#	fdbcli/fdbcli.actor.cpp
#	fdbclient/StorageServerInterface.cpp
#	fdbclient/StorageServerInterface.h
#	fdbserver/ApplyMetadataMutation.cpp
#	fdbserver/TLogServer.actor.cpp
#	flow/error_definitions.h
2021-09-09 23:13:22 -07:00
Chaoguang Lin 8cc3f3f49d Code format 2021-09-08 10:56:32 -07:00
Chaoguang Lin 8cef044a8b Remove commented code; simplify code 2021-09-08 10:42:46 -07:00
Chaoguang Lin af5643c998 Fix the issue in CheckStatus where it stuck as we cannot talk to any of the coordinators 2021-09-08 10:05:13 -07:00
Evan Tschannen 4bbae59bb0 Fixed a few bugs and added a backup popping mechanism 2021-09-02 21:11:44 -07:00
Chaoguang Lin 9b148c6c63 Adding code to hold the threadfuture of ITransaction::get; other fixes for using external clients 2021-09-02 11:52:39 -07:00
Josh Slocum b4bfd58bcb multiple blob workers appears to work 2021-08-30 13:07:25 -05:00
Chaoguang Lin 7168594ae4 Refactor status command 2021-08-27 15:02:49 -07:00
Chaoguang Lin 389e7051af Remove using the RYWTransaction object in fdbcli 2021-08-27 13:52:16 -07:00
Chaoguang Lin 46fd774d8c Move triggerddteaminfolog and tssq to new files; fix the reversed flag in tssq 2021-08-27 13:05:59 -07:00
Chaoguang Lin 991d61923f Refactor tssq command 2021-08-27 11:58:18 -07:00
Chaoguang Lin 140a8f46b6 Refactor triggerddteaminfolog command 2021-08-27 11:57:13 -07:00
Chaoguang Lin 1b57905931 Refactor option command to include the ITransaction handler 2021-08-27 11:56:33 -07:00
Chaoguang Lin 1aa12faf01 Refactor profile command, remove profile heap|flow commands 2021-08-27 11:52:29 -07:00
Chaoguang Lin 09ccba67cf Refactor suspend and expensive_data_check commands 2021-08-25 12:05:51 -07:00
Chaoguang Lin ce9bf5c5ce Create a new function to get all worker interfaces 2021-08-25 11:54:08 -07:00
Chaoguang Lin 41f09e9c2e Refactor kill command 2021-08-25 10:47:52 -07:00
Chaoguang Lin 0806309230
Merge pull request #5458 from sfc-gh-clin/refactor-transaction-related-commands
Refactor transaction related commands
2021-08-24 16:42:03 -07:00
Chaoguang Lin 868fa93d3d Merge branch 'master' of github.com:apple/foundationdb into refactor-cache_range-command 2021-08-24 12:58:23 -07:00
Chaoguang Lin 5f924c8952 Refactor transaction related commands like begin, commit, etc. 2021-08-24 11:53:39 -07:00
Chaoguang Lin e0a01504fd Solve comments, fix the help message 2021-08-24 09:50:31 -07:00
Chaoguang Lin 8c19969048 Refactor the cache_range command 2021-08-20 10:57:13 -07:00
Chaoguang Lin 3e34769c6d Merge branch 'master' of github.com:apple/foundationdb into ipc-bench 2021-08-19 21:40:27 +00:00
Chaoguang Lin 7258c085ac
Merge pull request #5395 from sfc-gh-clin/add-external-client-fdbcli-test
Add fdbcli external client tests
2021-08-19 14:30:22 -07:00
Chaoguang Lin b2c063dd93 Change g_network->runNetwork to API->runNetwork 2021-08-18 18:09:02 -07:00
Evan Tschannen a278d2977a renamed range feeds to change feeds, data distribution support almost complete 2021-08-13 14:27:15 -07:00
Josh Slocum 1a4e70d22f Merge branch 'feature-range-feed' into blob_full 2021-08-12 10:22:28 -05:00
Evan Tschannen 94239098a5 added additional rangefeed commands to fdbcli 2021-08-10 23:59:05 -07:00
Evan Tschannen 7891477a7c added support for streaming range feeds 2021-08-10 21:28:25 -07:00
Chaoguang Lin 618c72f7e2 Draft to use template to rewrite ThrottleApi 2021-08-11 01:07:36 +00:00
Josh Slocum 921a2cfca1 Merge branch 'feature-range-feed' into blob_full 2021-08-10 11:25:48 -05:00
Josh Slocum 247602753d Blob worker handles multiple ranges now 2021-08-10 11:19:43 -05:00
Evan Tschannen ed28aecde0 Merge branch 'master' into feature-range-feed 2021-08-09 20:40:55 -07:00
Evan Tschannen 42ae870c84 added support for querying specific range feed versions 2021-08-09 20:39:28 -07:00
Evan Tschannen 52fcf3f565 fixed a few bugs 2021-08-09 17:16:53 -07:00
Chaoguang Lin 815ad03122 Refactor datadistribution command 2021-08-06 18:27:45 +00:00
Josh Slocum a931f70cfb Added fdbcli for blobrange 2021-08-06 11:01:37 -05:00
Chaoguang Lin 7f7620d125 Refactor the setclass command 2021-08-05 19:01:17 +00:00
Evan Tschannen 0989c28a6b made range feeds durable on the storage server 2021-07-30 15:23:42 -07:00
Chaoguang Lin 9eec9376bd
Merge pull request #5285 from sfc-gh-clin/refactor-throttle-command
Refactor throttle command
2021-07-28 13:43:15 -07:00
Evan Tschannen 406562b282 Merge branch 'master' of https://github.com/apple/foundationdb into feature-range-feed 2021-07-27 17:04:58 -07:00
Lukas Joswiak b423432ee1 Make wait interruptable 2021-07-27 15:45:35 -07:00
Lukas Joswiak 08bc787356 Add timeout 2021-07-27 15:22:01 -07:00
Lukas Joswiak acfb9adbd2 Fix ctest timeouts 2021-07-27 15:10:49 -07:00
Lukas Joswiak 52940d38d9 Fix issue where GlobalConfig wasn't initialized in time when running fdbcli --exec 2021-07-27 14:12:01 -07:00
Chaoguang Lin 28128d79b1 Refactor throttle command 2021-07-27 17:58:11 +00:00
Steve Atherton f596a81073 Rename ::TRUE and ::FALSE in BooleanParams to ::True and ::False so as to not conflict with the TRUE and FALSE macros provided by the Windows and MacOS SDKs. 2021-07-17 00:11:40 -07:00
Evan Tschannen 15fe00927a Merge branch 'master' of https://github.com/apple/foundationdb into feature-range-feed
# Conflicts:
#	fdbcli/fdbcli.actor.cpp
#	fdbclient/NativeAPI.actor.cpp
#	fdbclient/StorageServerInterface.h
#	fdbclient/SystemData.cpp
#	fdbclient/SystemData.h
#	fdbserver/storageserver.actor.cpp
#	flow/ProtocolVersion.h
2021-07-12 19:10:14 -07:00
sfc-gh-tclinkenbeard 8cc40e3a2b Expand use of BOOLEAN_PARAM 2021-07-02 21:41:50 -07:00
sfc-gh-tclinkenbeard 79ff07a071 Added *BOOLEAN_PARAM macros to enforce documentation of boolean parameters 2021-07-02 15:04:42 -07:00
neethuhaneesha 63e530fc44
Merge pull request #4832 from neethuhaneesha/master
exclude servers based on locality match
2021-06-28 12:13:09 -07:00
Neethu Haneesha Bingi decfb610ff Minor review comments. 2021-06-25 15:04:49 -07:00