Commit Graph

44 Commits

Author SHA1 Message Date
A.J. Beamon e61748c7d5 Move metacluster into its own directory and static library 2023-03-30 16:07:49 -07:00
Yanqin Jin d461dbdd7b
Extend `metacluster status` on non-management clusters (#9179)
The metacluster status command in fdbcli currently reports some useful metacluster information when run on a
management cluster. We should update this command to report a status even on data clusters of a metacluster and
standalone clusters that do not belong to any metacluster.

- On data clusters, this would report that the cluster is a data cluster as well its name and the name of the metacluster it is a part of.
- On standalone clusters, status should report that the cluster is not part of a metacluster.

Test plan:
- CI
- Manual test
- Added new test `metacluster_fdbcli_tests.py` that can be run with ctest `ctest -R metacluster_fdbcli_tests`
2023-01-26 13:04:22 -08:00
A.J. Beamon 2e41eb8a4a Move fdbcli tests into the fdbcli directory 2022-09-22 16:05:56 -07:00
Andrew Noyes 984150bf74
Link fdbcli with -rdynamic for ubsan builds (#8033)
Closes #7957
2022-09-08 08:27:57 -07:00
Markus Pilman 4ac236eeba fdbcli compiling 2022-06-27 19:20:18 -06: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
A.J. Beamon f8cddd3842 Add fdbcli support for tenants 2022-03-17 12:10:39 -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
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
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
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
Chaoguang Lin 7168594ae4 Refactor status command 2021-08-27 15:02:49 -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 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 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 8de3417f24 Fix comment, add a new function for reading special keys' error message 2021-08-24 14:18:43 -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 8c19969048 Refactor the cache_range command 2021-08-20 10:57:13 -07:00
Chaoguang Lin 815ad03122 Refactor datadistribution command 2021-08-06 18:27:45 +00:00
Chaoguang Lin 7f7620d125 Refactor the setclass command 2021-08-05 19:01:17 +00:00
Chaoguang Lin 28128d79b1 Refactor throttle command 2021-07-27 17:58:11 +00:00
Chaoguang Lin 9b228fd4db Refactor snapshot command using the client function 2021-05-20 21:01:50 +00:00
Chaoguang Lin f3854fe8da Refactor force_recovery_with_data_loss command using the corresponding client function 2021-05-20 19:47:00 +00:00
Chaoguang Lin 6df94cba98 Refactor maintenance command using special keys 2021-05-20 18:37:03 +00:00
Chaoguang Lin 35b88cd28b refactor advanceversion command 2021-05-18 07:22:17 +00:00
Chaoguang Lin 9a6151d3fc Update fdbcli.h to fdbcli.actor.h, removed the unnecessary wrapper 2021-05-11 14:31:08 -07:00
Chaoguang Lin 302dd7d54d Update the file/function name to follow normal case naming as consistencyCheck* 2021-04-23 01:49:45 -07:00
Chaoguang Lin cb39d1a6ed Refactor consistencycheck command using special keys 2021-03-24 09:33:20 -07:00
Andrew Noyes 0ef44739ea Fix OPEN_FOR_IDE build in preparation for using clang-tidy 2021-01-26 02:04:11 +00:00
A.J. Beamon 382666d21e Permissions were wrong on installed files. A missing DESTINATION for fdbserver caused the binary to be missing. 2020-05-28 10:33:09 -07:00
A.J. Beamon 96f396ec7f Make sure to build the binary stripping targets when packaging stripped binaries 2020-05-27 16:40:07 -07:00
A.J. Beamon 2f9cd383ea Use stripped executables in packages when not building with debug symbols. 2020-05-21 13:39:55 -07:00
mpilman 2537f26de6 First implementaion of more user-friendly cpack
Up unto here this code is only very rudiemantery tested.

This is a firest attempt of making cpack more user-friendly.
The basic idea is to generate a component for package type so
that we can have different paths depending on whether we build
an RPM, a DEB, a TGZ, or a MacOS installer. The cpack package
config file will then chose the correct components to use.

In a later point this should make it possible to build these
with `make packages` and the ugly iteration with calling cmake
between each package would be obsolete. While this solution is
a bit more bloated, it is also much more flexible and it will be
much easier to use.

Another benefit is, that this will get rid of all warnings during
a cpack run
2019-03-07 16:49:29 -08:00
mpilman 9b14aeb156 Tell cmake not to link/install on ide build 2019-02-19 15:16:59 -08:00
mpilman 75f692b931 simplify actorcompiler and target to compile coveragetool 2019-02-15 00:01:42 -08:00
mpilman 449b9bf79c Fix typo that breaks linux build 2019-02-07 15:37:04 -08:00
mpilman 8a94d80deb fdbservice and fdbrpc now compiling 2019-02-07 15:37:04 -08:00
Markus Pilman df0f491c29 Some more improvements to the build and preparations for packaging 2018-12-13 15:04:13 -08:00
Markus Pilman c06bb33730 CMake compiles all binaries except for bindings 2018-12-13 14:15:44 -08:00