91 Commits

Author SHA1 Message Date
Markus Pilman
16467262f0 Merge remote-tracking branch 'origin/main' into features/private-request-streams 2022-04-10 14:12:37 -06:00
Dan Lambright
1b3b4166c6
Merge branch 'main' into vv 2022-04-08 17:18:13 -04: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
Markus Pilman
bf956f5630 Merge remote-tracking branch 'origin/main' into features/private-request-streams 2022-04-07 13:29:27 -06:00
Dan Lambright
60c55e0785 Merge remote-tracking branch 'origin/version-vector-prototype' into vv 2022-04-05 11:17:39 -04:00
Jingyu Zhou
7cd5ef711d Fix test failure to BlobGranule due to missing private mutations
The change feed metadata mutations use \xff\x02/feed/ prefix, which was not
considered as "metadata mutations", thus not sent to the resolvers. This makes
the private mutation generation not possible for change feed if the knob
PROXY_USE_RESOLVER_PRIVATE_MUTATIONS is on. Fix by making it a metadata
mutation.
2022-04-01 14:23:03 -07:00
Jingyu Zhou
cfcf0f152c Merge branch 'main-4a085fc84' into vv
Fix Conflicts:
	fdbclient/NativeAPI.actor.cpp
	fdbserver/ClusterRecovery.actor.cpp
	fdbserver/MasterInterface.h
	fdbserver/masterserver.actor.cpp
	flow/error_definitions.h
2022-03-30 22:28:06 -07:00
Jingyu Zhou
b34f4052cd Merge branch 'main-f28dfc12b' into vv
Fix Conflicts:
	fdbclient/MultiVersionTransaction.actor.cpp
	fdbclient/NativeAPI.actor.cpp
	fdbclient/NativeAPI.actor.h
	fdbserver/storageserver.actor.cpp
2022-03-30 21:01:25 -07:00
Jingyu Zhou
00b57d4cce Merge branch 'main-67eba5ec7' into vv
Fix Conflicts:
	fdbclient/CommitProxyInterface.h
	fdbclient/NativeAPI.actor.cpp
	fdbclient/StorageServerInterface.h
	fdbserver/CommitProxyServer.actor.cpp
	fdbserver/storageserver.actor.cpp
2022-03-30 20:05:55 -07:00
sfc-gh-tclinkenbeard
a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
Markus Pilman
118b53b7cf Merge remote-tracking branch 'origin/main' into features/private-request-streams 2022-03-17 12:06:44 +01:00
He Liu
c3a68d661e
Physical Shard Move (#6264)
Physical Shard Move part I: Checkpoint creation, transfer and restore.
2022-03-15 13:03:23 -07:00
Markus Pilman
bed799220a Addressed review comments, added test 2022-03-15 16:57:26 +01:00
sfc-gh-tclinkenbeard
8dcac2f76d Fix typos 2022-03-13 10:02:11 -03:00
Markus Pilman
8fac0081a8 Merge remote-tracking branch 'origin/main' into features/private-request-streams 2022-03-09 11:00:00 +01:00
A.J. Beamon
6f7adb04a5 Send a version along with GetKeyServerLocationsRequests to allow the proxy to reject missing tenants more quickly. Change the commit proxy tenant map to be unversioned. 2022-03-08 13:33:56 -08:00
A.J. Beamon
c99c7cf55f Apply tenant prefixes on the storage server. The commit proxy can serve tenant location requests. Fix some bugs. 2022-03-06 21:54:21 -08:00
A.J. Beamon
5fa9d3e1b7 Add a tenant parameter to read and commit requests. Store a map of all tenants on commit proxy and storage servers. Add an option to require tenant mode. 2022-03-06 21:54:21 -08:00
Markus Pilman
dc973fb67e Allow List and first test 2022-02-22 11:15:16 +01:00
Dan Lambright
9544379cdf rebase 2022-01-20 11:12:33 -05:00
Dan Lambright
9f4ac866cd Avoid context switch between appending version list and updating dv
Port PR 6117 (Resolver saves shardChanged in recent state transactions)
2021-12-13 13:02:32 -05:00
Lukas Joswiak
30867750b5 Add protection against storage and tlog data deletion when joining a new cluster 2021-11-09 12:29:47 -08:00
Jingyu Zhou
b4ed47053b Remove toString for mutations in trace events 2021-11-08 10:04:16 -08:00
Dan Lambright
befe1993c4 fix conflict on rebase 2021-10-29 12:25:26 -04:00
Evan Tschannen
f1158371a7 Merge branch 'master' of https://github.com/apple/foundationdb into feature-range-feed
# Conflicts:
#	flow/error_definitions.h
2021-10-21 00:55:12 -07:00
Jingyu Zhou
dd8840837d Assert private mutation counts are the same from Resolvers 2021-10-15 12:13:20 -04:00
Jingyu Zhou
c6a9ac11a8 fix another conflict fdbserver/ApplyMetadataMutation.cpp 2021-10-15 09:48:33 -04:00
Jingyu Zhou
c1d7b03087 CommitProxy uses Resolver's private mutations
Note the commit proxy still runs applyMetadataMutations for setting up memory
states, and no longer generates private mutations.
2021-10-15 09:47:23 -04:00
Jingyu Zhou
90a27bedf5 fix conflict fdbserver/ApplyMetadataMutation.cpp 2021-10-15 09:47:20 -04:00
Jingyu Zhou
ad64ee9858 Format fix 2021-10-15 09:45:57 -04:00
Jingyu Zhou
ff75d22ce8 Fix test failures
Need to be careful what values applyMetadataMutation needs.

Need to call txnStateStore->enableSnapshot() after receiving the broadcast to
allow semiCommit to happen.
2021-10-15 09:45:57 -04:00
Jingyu Zhou
fbc6f45190 Generate private mutations at Resolvers 2021-10-15 09:45:57 -04:00
Jingyu Zhou
e0184bc8aa resolve conflict 2021-10-15 09:45:52 -04:00
Josh Slocum
0dafb95bbf Fixing tss private mutations ranges 2021-10-11 18:14:29 -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
Dan Lambright
f3ebc47e75 Respond to comments 9/27 2021-09-30 11:51:57 -04:00
Dan Lambright
b78dd3b9dd Respond to comments 9/24 2021-09-30 11:51:57 -04:00
Dan Lambright
58e1888d8e remove network hop by getting previous commit versions in GetCommitVersionRequest 2021-09-30 11:51:57 -04:00
Xiaoge Su
abf73047ca Enforce std:: specifier rather than using namespace 2021-09-16 19:40:28 -07: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
Evan Tschannen
4bbae59bb0 Fixed a few bugs and added a backup popping mechanism 2021-09-02 21:11:44 -07:00
Xiaoge Su
fd1c09c853 fixup! Fix the code per comments 2021-08-24 12:58:14 -07:00
Xiaoge Su
a2114550e0 Refactor ApplyMetadataMutation for better readability 2021-08-24 12:58:14 -07:00
Evan Tschannen
a278d2977a renamed range feeds to change feeds, data distribution support almost complete 2021-08-13 14:27:15 -07:00
Steve Atherton
2bf7b9b7a9 Remove many calls to .toString(), .printable(), and printable(...) from TraceEvent .detail() values to avoid double-escaping characters such that the same values look different in different events and can't be easily searched for. Also fixed a few warnings found by clang. 2021-08-08 00:04:54 -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
Steve Atherton
507c1f11e3 Add .log() to bare TraceEvent() invocations without any .detail()s to avoid clang-tidy warning about immediate destruction of object without use. 2021-07-26 19:55:10 -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
Neethu Haneesha Bingi
73752f441b exclude locality:clang-format, ranged loops, documentation, tracking addStoragesever for exclusion. 2021-06-23 18:03:27 -07:00
Neethu Haneesha Bingi
62355571d0 exclude servers based on locality match 2021-06-23 18:03:27 -07:00