Commit Graph

9986 Commits

Author SHA1 Message Date
Josh Slocum b2a96b64e6 refactoring one function into two 2022-07-13 07:49:19 -05:00
Josh Slocum 03c39dc33b
Merge pull request from sfc-gh-jslocum/granule_merging
Granule merging
2022-07-13 07:25:26 -05:00
Yao Xiao e367a5a160
Add KVS physical shard metrics. () 2022-07-13 01:31:05 -07:00
Xiaoxi Wang a9e9772b98 fix argument bug 2022-07-12 16:49:09 -07:00
Josh Slocum f707626213 Cleanup 2022-07-12 17:43:44 -05:00
Xiaoxi Wang d3686143a1 merge upstream/main 2022-07-12 14:28:49 -07:00
Josh Slocum 236630855b Merge branch 'main' into granule_merging 2022-07-12 15:24:26 -05:00
Xiaoxi Wang a4929f3f6f
Merge pull request from sfc-gh-xwang/feature/dd-refactor-simple
[DD Testability] move waitDataDistributorEnabled to txnProcessor
2022-07-12 13:23:29 -07:00
Xiaoxi Wang bf98dc2a2b move waitDataDistributorEnabled to txnProcessor 2022-07-12 11:25:59 -07:00
Yi Wu 7d8131a39c
Worker register with cluster controller before disk file recovery ()
Previously worker servers only register with cluster controller after local file recovery. This PR change to let worker servers register itself before local file recovery, but indicate that although it can server stateless roles, it cannot become storage or TLog server. After local file recovery, the worker will register again to indicate it can now become storage and Tlog.

The change fixes the deadlock issue with encryption, where when there's only stateful workers that can become master and EKP, those worker servers won't be able to register with cluster controller since no EKP is available to provide cipher keys to decrypt encrypted storage.

For now we have the change only when encryption is on, and will make it the default behavior once we think it is stable.
2022-07-12 10:19:32 -07:00
Xiaoxi Wang 110f3bbde9 remove reset speedUpSimulation 2022-07-12 09:13:33 -07:00
Xiaoxi Wang 878adad43f reset some changes 2022-07-12 09:13:33 -07:00
Xiaoxi Wang 5e8f55768a use speedUp to extend transaction window 2022-07-12 09:13:32 -07:00
Xiaoxi Wang b4b4a4a2f9 an failed fix 2022-07-12 09:13:32 -07:00
Xiaoxi Wang 55aed68a45 detach debug commit 2022-07-12 09:13:32 -07:00
Junhyun Shim ac5436a090 Catch up on changes to main 2022-07-12 16:48:09 +02:00
Josh Slocum 0b0ac16a4c Merge branch 'main' into granule_merging 2022-07-12 09:09:30 -05:00
Markus Pilman 2edbcf2c65
Merge pull request from apple/main
Merge main
2022-07-12 07:51:22 -06:00
Josh Slocum c6700fe62f Merge branch 'main' into bg_file_chunking 2022-07-12 08:28:06 -05:00
Xiaoxi Wang 7e067ee4de move getInitialDataDistribution to DDTxnProcessor 2022-07-11 21:54:47 -07:00
Xiaoxi Wang cc185c51c6
Merge pull request from sfc-gh-xwang/feature/dd-refactor-incremental
[DD Testability] move updateReplicaKey to txnProcessor
2022-07-11 17:11:55 -07:00
Markus Pilman 4f4095b6ae
Merge pull request from sfc-gh-etschannen/fix-multiple-shared-tlogs
Avoid recruiting multiple shared tlogs
2022-07-11 17:28:35 -06:00
Markus Pilman 4ece33a0a8
Merge pull request from sfc-gh-anoyes/anoyes/fix-ubsan
Fix UBSAN build when statically linking libcxx
2022-07-11 17:27:37 -06:00
Fuheng Zhao 3aeb2f17cd Redwood remove duplicate header files 2022-07-11 12:44:44 -07:00
Josh Slocum 094999439d Fixing another change feed fetch race by making refreshing idempotent 2022-07-11 14:25:01 -05:00
Xiaoxi Wang f42b8687c2 add comment 2022-07-11 11:26:46 -07:00
Xiaoxi Wang 447eaa1d81 move updateReplicaKey to txnProcessor 2022-07-11 11:16:17 -07:00
Josh Slocum 33fcdc4764 Change Feed and Blob Worker operational improvements 2022-07-11 12:29:51 -05:00
Junhyun Shim dbf8f98481 Apply Clang format 2022-07-11 17:10:45 +02:00
Junhyun Shim 545a9a8043 Fix bugs and add token timeout-in-cache test 2022-07-11 16:58:04 +02:00
Junhyun Shim 61f3d14ec6 Add TokenCache test
Add function authz::jwt::TokenRef::toStringRef() for token tracing
Add StringRef::toStringView()
2022-07-11 13:42:41 +02:00
Chaoguang Lin 901d988de9
Add a knob SNAPSHOT_ALL_STATEFUL_PROCESSES to snapshot all processes with stateful class type(storage, log, transaction) even if they are not recruited () 2022-07-08 20:53:49 -07:00
Xiaoxi Wang 5ce1d7342d Merge branch 'feature/dd-refactor-incremental' of https://github.com/sfc-gh-xwang/foundationdb into feature/dd-refactor-incremental 2022-07-08 16:35:31 -07:00
Xiaoxi Wang 9fe76ecf21 format 2022-07-08 16:34:55 -07:00
Xiaoxi Wang a941a28de7
Merge branch 'apple:main' into feature/dd-refactor-incremental 2022-07-08 16:07:16 -07:00
Xiaoxi Wang b48b1e93f9 remove header dependency; move getDatabaseConfiguration to txnProcessor 2022-07-08 16:01:23 -07:00
A.J. Beamon 712f40b727 Add support for tenant groups 2022-07-08 15:59:25 -07:00
Xiaoxi Wang 6be20d08ae
Merge pull request from sfc-gh-xwang/feature/dd-refactor-incremental
[DD Testability] move takeMoveKeysLock to DDTxnProcessor
2022-07-08 15:40:14 -07:00
He Liu aa43956fbd
Sharded RocksDB ()
* Some fixes.

* Enabled ShardedRocksDB in IKeyValueStore.h

* Added unit test for ShardedRocks for \xff\xff key space read/write.

* Resolved comments.

* Return empty read results if the physical shards are not initialized.

Co-authored-by: He Liu <heliu@apple.com>
2022-07-08 15:17:38 -07:00
Bharadwaj V.R aca44c8644
Increase frequency of RelocateShardStartSplit traces for better observability of splits () 2022-07-08 14:45:44 -07:00
Xiaoxi Wang 9cead35911 add contract comments 2022-07-08 14:19:14 -07:00
Xiaoxi Wang f5a81154ef move takeMoveKeysLock to DDTxnProcessor 2022-07-08 14:11:31 -07:00
Jingyu Zhou 4103b16793 Fix a performance bug in Resolver
The erased bytes from recent state transactions was accidently set to 0 and
cause anyPopped to be always false. Thus, when totalStateBytes will never
decrease and can cause high latency between "Resolver.resolveBatch.Before" and
"Resolver.resolveBatch.AfterQueueSizeCheck", in hundreds of milliseconds. This
will cause high server side commit latency.
2022-07-08 09:58:28 -07:00
Markus Pilman f268265d96
Apply suggestions from code review
Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
Co-authored-by: Junhyun Shim <junhyun.shim@snowflake.com>
2022-07-08 10:42:44 -06:00
He Liu bc5bfaffda
Shard based move ()
* Shard based move.

* Clean up.

* Clear results on retry in getInitialDataDistribution.

* Remove assertion on SHARD_ENCODE_LOCATION_METADATA for compatibility.

* Resolved comments.

Co-authored-by: He Liu <heliu@apple.com>
2022-07-07 20:49:16 -07:00
Steve Atherton e63cb431e1
Merge pull request from sfc-gh-satherton/storage-type-improvements
Add StorageEngine type to StorageMetrics trace events
2022-07-07 16:26:43 -07:00
Markus Pilman a2ef5dc72a set token properly in test 2022-07-07 12:00:32 -06:00
Andrew Noyes 55548e4ac8 Avoid signed integer overflow 2022-07-07 10:19:20 -07:00
Andrew Noyes 8c1813e377 Don't pass nullptr to memcpy 2022-07-07 10:19:20 -07:00
Sreenath Bodagala fa0c3249ca
Merge pull request from sbodagala/main
Make sequencer aware of the locality of the primary region
2022-07-07 14:00:10 +05:30
A.J. Beamon c4b0f6eaae
Add an internal C API to support connection to a cluster using a connection string ()
* 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
Steve Atherton 03df62e2fc Added StorageEngine detail to StorageMetrics trace event. 2022-07-07 00:10:04 -07:00
Markus Pilman 56541167c2 send token with tenant info object 2022-07-06 20:58:17 -06:00
Yao Xiao f98d5ae9e9
[ShardedRocksDB] 5/N Generate and persist metadata for range mapping. () 2022-07-06 15:57:46 -07:00
Jon Fu df1f108b78 Merge branch 'main' of github.com:apple/foundationdb into jfu-tenant-rename 2022-07-06 14:10:22 -07:00
Dan Lambright bb99b59deb
Change VersionVectorTagUpdates to LatencySample () 2022-07-06 16:48:15 -04:00
A.J. Beamon 1e8225a19e
Merge pull request 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
Sreenath Bodagala a84112d30b - Propagate the locality of the primary region from ClusterController
to the sequencer, rather than deriving it from "MasterInterface" on
the sequencer (which is not correct).
2022-07-06 11:57:06 +00:00
Junhyun Shim db449b80f7
Authz JWKS ()
* Add JsonWebKeySet parser/stringifier

* Update header directory

* Make JWKS parser correctness clean for OpenSSL 1.x

Add RSA keygen support

* Make JWKS parser correctness clean for OpenSSL 3.x

+extend unique_ptr for scoped destruction of OpenSSL objects

* Use PKey::{sign|verify}() in TokenSign

* Apply AutoCPointer to MkCert

* Apply Clang format

* JWKS::toStringRef() returns StringRef > Optional<StringRef>

* Fix Mac/Windows build error

* Fix incorrect fix of Mac build

* Fix filename in license comment for AutoCPointer.h

* Refactor complex C macros into function templates
2022-07-05 10:13:09 +02:00
Steve Atherton c417df83f3
Merge pull request from sfc-gh-ajbeamon/more-generic-key-backed-types
Update key backed types to support multiple transaction types and different codecs
2022-07-01 14:37:02 -07:00
Josh Slocum 08ca0a9883
Merge pull request from sfc-gh-jslocum/cf_memory_perf
Change Feed Reading CPU optimization
2022-07-01 14:06:39 -05:00
Dan Lambright ea42e9f59c
Do not delay sending empty messages twice () 2022-07-01 14:22:53 -04:00
A.J. Beamon 9e659b62ee Fix idempotent spelling 2022-07-01 10:34:10 -07:00
A.J. Beamon 62683b4140 Update key backed types to support a templated Codec. This required updating the existing Codec to convert from objects into byte strings through tuples. 2022-07-01 10:11:02 -07:00
A.J. Beamon 1dc78a3b3f Add support for different transaction types (Reference<ITransaction>, Reference<ReadYourWritesTransaction>) to key backed types 2022-07-01 10:02:39 -07:00
A.J. Beamon aff21f062f Fix indentation and refactor prefix construction to be in forward order 2022-07-01 09:50:05 -07:00
Josh Slocum 9e64037b25 Merge branch 'main' into bg_file_chunking 2022-06-30 17:13:02 -05: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
Josh Slocum f943efb3b1 Change Feed Reading CPU optimization 2022-06-30 15:32:41 -05:00
Josh Slocum 48bcf6eaba
parameterizing min split size instead of hardcoding it to min_shard_bytes () 2022-06-30 12:28:22 -07:00
Xiaoxi Wang e85e7794c2
Merge pull request from sfc-gh-xwang/features/ppw-pause-state
Add timeout handler for storage wiggler status fetcher
2022-06-30 11:23:29 -07:00
Jingyu Zhou d60cab788e
Merge pull request from jzhou77/main
Add pipelining for secondary queries in index prefetch
2022-06-30 10:27:29 -07:00
A.J. Beamon 76a147a104
Merge pull request from sfc-gh-ajbeamon/refactor-tenant-map-encoding
Refactor how tenant map entries are encoded and decoded
2022-06-30 09:48:38 -07:00
Jingyu Zhou 4910f69f60
Update fdbserver/storageserver.actor.cpp
Co-authored-by: Hao Fu <77984096+hfu94@users.noreply.github.com>
2022-06-30 09:19:19 -07:00
Dan Lambright 98b18e3a18
Remove code obsoleted by commit c48d5690 () 2022-06-30 12:16:23 -04:00
Jingyu Zhou 467642ac7f Remove semicolons 2022-06-30 09:12:58 -07:00
Xiaoxi Wang e69604be42 Merge branch 'main' of https://github.com/apple/foundationdb into features/ppw-pause-state 2022-06-30 09:01:29 -07:00
Xiaoxi Wang 0beaf3bb93
Merge pull request from sfc-gh-tclinkenbeard/monitor-client-rates
Make GlobalTagThrottlerTesting::monitorClientRates more lenient
2022-06-30 09:00:22 -07:00
Markus Pilman 3d529fb145
Merge pull request from sfc-gh-tclinkenbeard/remove-tpcc
Remove TPC-C workloads
2022-06-30 09:49:09 -06:00
sfc-gh-tclinkenbeard 3e542b7ab1 Make GlobalTagThrottlerTesting::monitorClientRates less strict 2022-06-30 00:59:26 -07:00
Xiaoxi Wang b51e9430a5 fix timeout buggify 2022-06-29 22:46:50 -07:00
sfc-gh-tclinkenbeard 72f5335460 Remove TPCC workloads 2022-06-29 22:31:56 -07:00
Jingyu Zhou 842004f3b3 Code clean-up 2022-06-29 21:29:41 -07:00
Jingyu Zhou ba5e2ed72d Add batching for secondary queries in index prefetch
This is to reduce excessive load being issued concurrently, controlled by knob
MAX_PARALLEL_QUICK_GET_VALUE.
2022-06-29 21:17:11 -07:00
Xiaoxi Wang 1b0780398f Merge branch 'main' of https://github.com/apple/foundationdb into features/ppw-pause-state 2022-06-29 21:03:47 -07:00
Jingyu Zhou da26a4c373 Issue secondary query in parallel for GetMappedKeyValues
In case the subquery is a local miss, it becomes a remote call. Then such an
optimization can significantly reduce latency.
2022-06-29 17:45:10 -07:00
Xiaoxi Wang 570dfd6760 add timeout handler 2022-06-29 15:30:37 -07:00
Yi Wu 364644673f
Support TLog encryption in commit proxy ()
This PR add support for TLog encryption through commit proxy. The encryption is done on per-mutation basis. As CP writes mutations to TLog, it inserts encryption header alongside encrypted mutations. Storage server (and other consumers of TLog such as storage cache and backup worker) decrypts the mutations as they peek TLog.
2022-06-29 14:21:05 -07:00
Jon Fu 5e7bb0aa21 Merge branch 'main' of github.com:apple/foundationdb into jfu-tenant-rename 2022-06-29 13:20:19 -07:00
Xiaoxi Wang c9366f8b01
Merge pull request from sfc-gh-xwang/bug/remotekv
Make g_simulator.datacenterDead() don't take spawn KV process into account
2022-06-29 11:43:27 -07:00
Chaoguang Lin 29f98f3654
Avoid duplicate snapshot on one process if it serves as multiple roles ()
* Fix comments

* Add simulation value for SERVER_KNOBS->SNAP_CREATE_MAX_TIMEOUT

* A work version with correctness clean

* Remove unnecessay comments; debugging symbols

* Only check secondary address for coordinators, same as before

* Change the trace to SevError and remove the ASSERT(false)

* Remove TLogSnapRequest handling on TlogServer, which is changed to use WorkerSnapRequest

* Add retry for network failures

* Add retry limit for network failures; still allow duplicate snapshots on processes are both tlog and storage to avoid race

* Add retry limit as a knob and make backoff exponentail

* Add getDatabaseConfiguration(Transaction* tr)

* revert back to send request for each role once

* update some comments
2022-06-29 11:23:07 -07:00
A.J. Beamon 26b35c07cd Refactor how tenant map entries are encoded and decoded. Add a specific version to the encoding that matches the version used when this feature was introduced (and the only version in which it was used). 2022-06-29 10:58:58 -07:00
Trevor Clinkenbeard db769667ae
Merge pull request from sfc-gh-tclinkenbeard/global-tag-throttling3
Create Global Tag Throttler
2022-06-29 10:06:00 -07:00
Xiaoxi Wang 0054b8a754 Merge branch 'main' of https://github.com/apple/foundationdb into bug/remotekv 2022-06-28 23:41:25 -07:00
Xiaoxi Wang c6ff556f06 fix bug by exclude the spawned kv process info when counting dead process; add method 2022-06-28 23:39:22 -07:00
sfc-gh-tclinkenbeard 2134fa9a0c Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-28 19:51:41 -07:00
sfc-gh-tclinkenbeard b4193f701e Mark CoordinatedState::getConflict const 2022-06-28 19:45:58 -07:00
sfc-gh-tclinkenbeard be9a2002c3 Merge remote-tracking branch 'origin/main' into fix-knob-typo 2022-06-28 15:58:18 -07:00
Yao Xiao cc93dfd289
Add getStorageBytes. () 2022-06-28 14:37:26 -07:00
Jingyu Zhou ec9c3cf05c Remove unused variables 2022-06-28 16:41:58 -04:00
Markus Pilman 9d16260822 Merge remote-tracking branch 'origin/main' into features/authz 2022-06-28 13:13:51 -06:00
Jon Fu 5fee5e1a73 add renameTenant back to TenantAPI after rebase 2022-06-28 11:54:03 -07:00
Jon Fu c9065b50bb add extra assertion 2022-06-28 11:36:20 -07:00
Jon Fu 2f8c9c4afe check DB after rename in test workload 2022-06-28 11:36:20 -07:00
Jon Fu 9276c885a9 change workload to allow for any combination of renames and handle errors accordingly 2022-06-28 11:36:18 -07:00
Jon Fu b491c9feb6 introduce renaming to tenant management workload 2022-06-28 11:35:57 -07:00
Xiaoxi Wang 5a6174db58
Merge pull request from sfc-gh-bvr/mlrc
Increase timeout for QuietDatabase when buggify is on
2022-06-28 11:30:44 -07:00
Bharadwaj V.R 78af3648e2
Merge branch 'apple:main' into mlrc 2022-06-28 10:33:35 -07:00
sfc-gh-tclinkenbeard 086e4bff06 Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-28 10:18:13 -07:00
Markus Pilman fc2f695b15 Merge remote-tracking branch 'origin/main' into features/cmake-refactor-dirs 2022-06-28 10:41:07 -06:00
A.J. Beamon fcd91f676a
Merge pull request from sfc-gh-ajbeamon/tenant-reorganization
Tenant code refactoring
2022-06-28 09:16:19 -07:00
Markus Pilman 1bdbd89839 Merge remote-tracking branch 'origin/main' into features/cmake-refactor-dirs 2022-06-28 08:52:03 -06:00
Bharadwaj V.R 71705bf930 Increase timeout for QuietDatabase when buggify is on 2022-06-27 23:03:00 -07:00
Markus Pilman 41181cda26 fdbserver compiling (but linking still fails) 2022-06-27 18:54:58 -06:00
Markus Pilman 03d913a1de Flow compiling 2022-06-27 17:05:55 -06:00
He Liu 61d621a4c4
Fix read iterator pool race () 2022-06-27 14:51:26 -07:00
Xiaoxi Wang ab2a6bda99
Merge pull request from sfc-gh-xwang/feature/ddtxn
[Data Distribution Testability] move getServerListAndProcessClasses to NativeAPI
2022-06-27 14:06:23 -07:00
Markus Pilman 624430b6ae addess review comments 2022-06-27 14:22:23 -06:00
A.J. Beamon 4bafe77889 Some refactoring of tenant code:
* extract tenant management into its own file and namespace
* rename the tenant management workload source file
* extract tenant special keys functions to a separate file
* extract some helper functions to GenericTransactionHelper.h
* convert StringRef -> TenantNameRef
* move some TenantMapEntry implementation into the cpp file
* add some helper functions to decode/encode a tenant mode
2022-06-27 12:32:49 -07:00
Xiaoxi Wang 62d4ac550a Merge branch 'main' of https://github.com/apple/foundationdb into feature/ddtxn 2022-06-27 11:35:22 -07:00
neethuhaneesha d80506fd21 Adding logId to trace events. 2022-06-27 10:41:05 -07:00
Markus Pilman 3aaae9c521 Merge remote-tracking branch 'origin/main' into features/authz 2022-06-27 11:07:14 -06:00
sfc-gh-tclinkenbeard 0c2bd73e28 Fix typo in SHARD_READ_HOT_BANDWIDTH_MIN_PER_KSECONDS name 2022-06-27 09:56:02 -07:00
Markus Pilman e35633149c
Merge pull request from sfc-gh-mpilman/bugfixes/cmake-disallow-illegal-cross-module-includes
enforce include modularization in cmake
2022-06-24 22:42:18 -06:00
Markus Pilman a47ed89018 Linux fixes and addressed review comments 2022-06-23 20:52:13 -06:00
Markus Pilman 38e100ebc5 flow bindings are compiling 2022-06-23 19:06:05 -06:00
Markus Pilman de48e90276 fdbserver is now compiling 2022-06-23 18:45:26 -06:00
Markus Pilman 8af056e7b0 fdbclient now compiling 2022-06-23 18:05:36 -06:00
Markus Pilman ffaf15c12a moved wellknownendpoints and fixed some includes 2022-06-23 17:03:53 -06:00
Xiaoxi Wang a5054b2beb move getServerListAndProcessClasses to NativeAPI 2022-06-23 15:28:45 -07:00
Markus Pilman d35445a868 enforce include modularization in cmake 2022-06-23 14:37:35 -06:00
Zhe Wu 3cb587edfb Remove explicit degraded peer recovery since this may be false positive 2022-06-23 09:38:27 -07:00
Xiaoxi Wang ab2f2bc9b3 format code 2022-06-23 09:16:42 -07:00
Xiaoxi Wang c9ac30612f Merge branch 'main' of https://github.com/apple/foundationdb into readaware 2022-06-23 09:12:07 -07:00
Vaidas Gasiunas e28a8401fb
Update coordinator list from cluster file ()
* Log failed connection attempts in monitorProxies

* Update coordinator list from the cluster file after failing to connect to all coordinators

* Wiggle and upgrade test with legacy version monitoring; updating tests to use 7.1.9

* Update coordinator list from the cluster file: addressing review comments

* Update coordinator list from the cluster file: addressing review comments

* Wait on future for all setAndPersistConnectionString calls
2022-06-23 09:22:09 +02:00
sfc-gh-tclinkenbeard 840dac1fa3 Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-22 22:17:33 -07:00
Markus Pilman db7a0553ad Fix future cancel when we get cancelled by parent 2022-06-22 18:35:40 -06:00
Lukas Joswiak 88557d9169 Simplify function call when transaction is null 2022-06-22 14:50:17 -07:00
Lukas Joswiak b80ed948f1 Check initialization status before accessing field 2022-06-22 14:50:17 -07:00
Ata E Husain Bohra e1ca0ef9a2
Defer recoveredDiskFiles wait if Encryption data at-rest is enabled ()
* Defer recoveredDiskFiles wait if Encryption data at-rest is enabled

Description

In the current code ClusterController startup wait for 'recoveredDiskFiles'
future to complete before triggered 'clusterControllerCore' actor, which
inturn starts 'EncryptKeyProxy' (EKP) actor resposible to fetch/refresh
encryption keys needed for ClusterRecovery as well interactions with
KMS.

Patch addresses a circular dependency where StorageServer initialization
depends on EKP, but, CC doesn't recruit EKP till 'recoveredDiskFiles' completes
which includes SS initialization. Given 'recoveredDiskFiles' is an optimization,
the patch proposes deferring the 'recoveredDiskFiles' future completion until
new Master recruitment is done as part of ClusterRecovery (unblock EKP singleton)

Testing

Ran 500K correctness runs: 20220618-055310-ahusain-foundationdb-61c431d467557551
Recorded failures doesn't seems to be related to the change.
2022-06-21 18:18:57 -07:00
Bharadwaj V.R 8cf2be030f
Build a TenantCache for use by DD ()
* Add an DD tenant-cache-assembly actor
* Add basic tenant list monitoring for tenant cache. 
* Update DD tenant cache refresh to be more efficient and unit-testable
* Remove the DD prefix in the tenant cache class name (and associated impl and UT class names); there is nothing specific to DD in it; DD uses it; other modules may use it in the future
* Disable DD tenant awareness by default
2022-06-21 16:29:30 -07:00
Lukas Joswiak 9ca8a3c683 Reenable status json for dynamic knobs, add unit test 2022-06-21 11:43:05 -07:00
sfc-gh-tclinkenbeard 2391e58fb2 Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-21 10:09:15 -07:00
Dan Lambright c48d569024
fix a fault injection bug in txn store recovery ()
* fix a fault injection bug in txn store recovery

* Update LogSystemDiskQueueAdapter.actor.cpp

typo

* recoverLoc can be overwritten, so on reset use the stored range start
2022-06-21 12:33:58 -04:00
Josh Slocum 34e6a8f942
Merge pull request from sfc-gh-jslocum/bg_tenant_improvements
Bg tenant improvements
2022-06-17 11:19:41 -05:00
Markus Pilman 5aacaf891c
Merge pull request from sfc-gh-ajbeamon/multiple-tenant-creation
Support creating multiple tenants in the same transaction
2022-06-17 10:10:09 -06:00
Xiaoxi Wang 6bb4e341f9
Merge pull request from sfc-gh-xwang/features/ppw-pause-state
Adding paused/running wiggling status to status json and also the last running/paused timestamp
2022-06-16 14:27:18 -07:00
Xiaoxi Wang a311cc28cc solve some comments 2022-06-16 11:07:21 -07:00
Josh Slocum b3597ef3a8 Added plumbing for tenant-aware purge granules 2022-06-16 13:04:34 -05:00
sfc-gh-tclinkenbeard fabc751b0d Add /GlobalTagThrottler/UpdateQuota unit test 2022-06-15 23:32:39 -07:00
sfc-gh-tclinkenbeard 1cfd019382 Add /GlobalTagThrottler/SkewedMultiClientActiveThrottling unit test 2022-06-15 23:06:01 -07:00
sfc-gh-tclinkenbeard dd08c2b180 Add multiclient unit tests for GlobalTagThrottler 2022-06-15 22:57:15 -07:00
sfc-gh-tclinkenbeard 1505ef86db Mark RkTagThrottleCollection::RkTagThrottleData::getTargetRate const 2022-06-15 21:33:23 -07:00
sfc-gh-tclinkenbeard 5c2bcb275a Add GlobalTagThrottlerTesting namespace 2022-06-15 19:59:18 -07:00
sfc-gh-tclinkenbeard 8dccf7c10c Added /GlobalTagThrottler/MultiTagThrottling unit test 2022-06-15 19:39:58 -07:00
sfc-gh-tclinkenbeard d692516f64 Add /GlobalTagThrottler/WriteThrottling unit test 2022-06-15 19:28:25 -07:00
sfc-gh-tclinkenbeard a423fc77db Use multiple storage servers for GlobalTagThrottler unit tests 2022-06-15 19:15:57 -07:00
sfc-gh-tclinkenbeard bef2f5dfaf Recalculate rate in each iteration of testClient 2022-06-15 19:12:25 -07:00
sfc-gh-tclinkenbeard 9179382fc3 Add TestStorageServers class to mock storage servers for GlobalTagThrottler testing 2022-06-15 19:08:34 -07:00
sfc-gh-tclinkenbeard f18dbedb68 Add /GlobalTagThrottler/ActiveThrottling unit test 2022-06-15 17:52:40 -07:00
sfc-gh-tclinkenbeard da452afde4 Add testGetTPSLimit function for global tag throttler unit testing 2022-06-15 17:38:37 -07:00
sfc-gh-tclinkenbeard 0216740c0c Add /GlobalTagThrottler/Simple unit test 2022-06-15 17:21:54 -07:00
sfc-gh-tclinkenbeard 77e3d81f55 Track per-tag rates separately for each storage server in GlobalTagThrottler 2022-06-15 15:07:07 -07:00
Andrew Noyes 83aceb216c
Use absl::GetStackTrace for slow task profiler ()
* Make SlowTask workload runnable in joshua

* Remove SignalSafeUnwind, and use absl::GetStackTrace for slow task profiler
2022-06-15 14:53:52 -07:00
Josh Slocum 3f871f4123 Chunked Snapshot Files passes unit test 2022-06-15 14:52:28 -05:00
Sreenath Bodagala 2c85bb71c1 - Do not try to figure out the sequencer locality if knob
ENABLE_VERSION_VECTOR_HA_OPTIMIZATION is disabled.
2022-06-15 16:08:31 +00:00
Ata E Husain Bohra 8808d93813
Fix bugs in EncyrptKeyProxy actor ()
Description

Major changes include:
1. GetEncryptByKeyIds cache elements can expire.
2. Update iterator after erasing an element during refresh encryption keys
   operation.

Testing

EncryptKeyProxyTest
2022-06-14 21:22:25 -07:00
Evan Tschannen 4e19126f1c fix: when multiple shared tlogs are restored from disk, do not recruit a new one on the same process until all of the restored ones have shut down 2022-06-14 14:41:47 -07:00
Yao Xiao 7da26db342
[ShardedRocksDB] 4/N Support removeRange. () 2022-06-14 13:52:03 -07:00
Yi Wu 6246664006
Support encrypting TxnStateStore ()
Adding encryption support for TxnStateStore. It is done by supporting encryption. for KeyValueStoreMemory. The encryption is currently done on operation level when the operations are being write to the underlying log file. See inline comment for the encrypted data format.

This PR depends on . It is part of the effort to support TLog encryption .
2022-06-14 13:26:32 -07:00
sfc-gh-tclinkenbeard 44e367830a Remove unnecessary indirection in Ratekeeper::monitorThrottlingChanges implementation 2022-06-14 11:24:26 -07:00
Markus Pilman 13d8b13722 Migrated Authz code to use JWT 2022-06-13 18:20:27 -06:00
Markus Pilman 799fe32346 Merge remote-tracking branch 'origin/main' into features/authz 2022-06-13 18:02:11 -06:00
sfc-gh-tclinkenbeard b7fd69ed7f Add GLOBAL_TAG_THROTTLING_TRACE_INTERVAL knob 2022-06-13 16:09:21 -07:00
Trevor Clinkenbeard 6bed046148
Merge pull request from sfc-gh-xwang/feature/ddtxn
[DD testability enhancement] Create IDDTxnProcessor and simple refactoring
2022-06-13 16:01:13 -07:00
Xiaoxi Wang ef0f415e3d add option; change to shared_ptr 2022-06-13 13:55:48 -07:00
Andrew Noyes 013b290ca5
Don't fail test if log cursor times out during network partition ()
* Don't fail test if log cursor times out during network partition

Also, exercise the codepath for handling timed_out in simulation, by
reverting this knob buggification behavior to that of 07976993e7.

* clang-format
2022-06-13 13:28:22 -07:00
Trevor Clinkenbeard 942d687506
Clean up includes in actor header files ()
* Remove unnecessary actorcompiler.h includes (from non-actor files)

* Make AsyncFileChaos a non-actor header file

* Add unactorcompiler.h include to the end of actor header files

* Add missing actorcompiler.h includes to actor header files
2022-06-13 13:26:51 -07:00
Ata E Husain Bohra a5d91fe18a
KmsConnector implementation to support KMS driven CipherKey TTL ()
* KmsConnector implementation to support KMS driven CipherKey TTL

Description

KMS CipherKeys can be of two types:
1. Revocable CipherKeys: having a finite lifetime, after which the CipherKey
shouldn't be used by the FDB.
2. Non-revocable CipherKeys: ciphers are not revocable, however, FDB would
still want to refresh ciphers to support KMS cipher rotation feature.

Patch proposes following change to incorporate support for above defined cipher-key
types:
1. Extend KmsConnector response to include optional 'refreshAfter' & 'expireAfter'
time intervals. EncryptKeyProxy (EKP) cache would define corresponding absolute refresh &
expiry timestamp for a given cipherKey. On an event of transient KMS connectivity outage,
a caller of EKP API for a non-revocable key should continue using cached cipherKey until
it expires.
2. Simplify KmsConnector API arena handling by using VectorRef to represent component
structs and manage associated memory allocation/lifetime.

Testing

1. EncryptKeyProxyTest
2. RESTKmsConnectorTest
3. SimKmsConnectorTest

* KmsConnector implementation to support KMS driven CipherKey TTL

Description

  diff-1: Set expireTS for baseCipherId indexed cache

KMS CipherKeys can be of two types:
1. Revocable CipherKeys: having a finite lifetime, after which the CipherKey
shouldn't be used by the FDB.
2. Non-revocable CipherKeys: ciphers are not revocable, however, FDB would
still want to refresh ciphers to support KMS cipher rotation feature.

Patch proposes following change to incorporate support for above defined cipher-key
types:
1. Extend KmsConnector response to include optional 'refreshAfter' & 'expireAfter'
time intervals. EncryptKeyProxy (EKP) cache would define corresponding absolute refresh &
expiry timestamp for a given cipherKey. On an event of transient KMS connectivity outage,
a caller of EKP API for a non-revocable key should continue using cached cipherKey until
it expires.
2. Simplify KmsConnector API arena handling by using VectorRef to represent component
structs and manage associated memory allocation/lifetime.

Testing

1. EncryptKeyProxyTest
2. RESTKmsConnectorTest
3. SimKmsConnectorTest

* KmsConnector implementation to support KMS driven CipherKey TTL

Description

  diff-2: Fix Valgrind issues discovered runnign tests
  diff-1: Set expireTS for baseCipherId indexed cache

KMS CipherKeys can be of two types:
1. Revocable CipherKeys: having a finite lifetime, after which the CipherKey
shouldn't be used by the FDB.
2. Non-revocable CipherKeys: ciphers are not revocable, however, FDB would
still want to refresh ciphers to support KMS cipher rotation feature.

Patch proposes following change to incorporate support for above defined cipher-key
types:
1. Extend KmsConnector response to include optional 'refreshAfter' & 'expireAfter'
time intervals. EncryptKeyProxy (EKP) cache would define corresponding absolute refresh &
expiry timestamp for a given cipherKey. On an event of transient KMS connectivity outage,
a caller of EKP API for a non-revocable key should continue using cached cipherKey until
it expires.
2. Simplify KmsConnector API arena handling by using VectorRef to represent component
structs and manage associated memory allocation/lifetime.

Testing

1. EncryptKeyProxyTest
2. RESTKmsConnectorTest
3. SimKmsConnectorTest

* KmsConnector implementation to support KMS driven CipherKey TTL

Description

  diff-3: Address review comment
  diff-2: Fix Valgrind issues discovered runnign tests
  diff-1: Set expireTS for baseCipherId indexed cache

KMS CipherKeys can be of two types:
1. Revocable CipherKeys: having a finite lifetime, after which the CipherKey
shouldn't be used by the FDB.
2. Non-revocable CipherKeys: ciphers are not revocable, however, FDB would
still want to refresh ciphers to support KMS cipher rotation feature.

Patch proposes following change to incorporate support for above defined cipher-key
types:
1. Extend KmsConnector response to include optional 'refreshAfter' & 'expireAfter'
time intervals. EncryptKeyProxy (EKP) cache would define corresponding absolute refresh &
expiry timestamp for a given cipherKey. On an event of transient KMS connectivity outage,
a caller of EKP API for a non-revocable key should continue using cached cipherKey until
it expires.
2. Simplify KmsConnector API arena handling by using VectorRef to represent component
structs and manage associated memory allocation/lifetime.

Testing

1. EncryptKeyProxyTest
2. RESTKmsConnectorTest
3. SimKmsConnectorTest
2022-06-13 13:25:01 -07:00
Xiaoxi Wang 1de6c09307 use struct instead of tuple 2022-06-13 11:27:50 -07:00
sfc-gh-tclinkenbeard df71a49bf6 Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-13 10:03:10 -07:00
sfc-gh-tclinkenbeard 75c858eb2c Differentiate between different quotas in GlobalTagThrottling workload 2022-06-13 10:01:55 -07:00
Xiaoxi Wang c12a7a30ed
Update fdbserver/DataDistributionQueue.actor.cpp
Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
2022-06-13 08:22:48 -07:00
Xiaoxi Wang 9604db3f10
Update fdbserver/DDTxnProcessor.h
Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
2022-06-13 08:19:14 -07:00
Josh Slocum 058f44a4ae Fixed req begin version when time travelling back from merge 2022-06-10 15:11:30 -05:00
Josh Slocum 710612442c small fixes 2022-06-09 17:21:21 -05:00
Xiaoxi Wang fb66561bc4 format code 2022-06-09 14:43:09 -07:00
Xiaoxi Wang 7ee6808ebd solve compiler warning 2022-06-09 14:32:24 -07:00
Xiaoxi Wang b99bd45730 format code 2022-06-09 12:36:20 -07:00
Xiaoxi Wang 178bab5faf Merge branch 'readaware-perf' into readaware 2022-06-09 12:23:41 -07:00
Xiaoxi Wang e5aa5fef22 merge upstream/main 2022-06-09 12:17:27 -07:00
Xiaoxi Wang 6ab12ea971 add storeTuple and unit test; refactor getSourceServersForRange 2022-06-09 12:16:12 -07:00
Yao Xiao 0bb02f6415
[Sharded RocksDB] 3/N Implement functions for range clear. () 2022-06-09 10:50:39 -07:00
Josh Slocum d6920cde28 Implemented blob granule merging 2022-06-09 10:50:53 -05:00
Jingyu Zhou 7acd184a38
Merge pull request from jzhou77/fix-status-memory
Add rss_bytes to process memory and fix available_bytes calculation
2022-06-08 13:10:51 -07:00
Jingyu Zhou b9ff6bc129 Address AJ's comments 2022-06-08 09:38:32 -07:00
Sreenath Bodagala fe5f11358f
Merge pull request from sbodagala/main
Introduce a knob that controls the placement of remote storage server commit versions in version vector
2022-06-08 12:18:15 -04:00
Markus Pilman d141347500
Merge pull request from Doxense/fix-windows-tests
Fix windows tests
2022-06-08 08:18:47 -06:00
Bharadwaj V.R d4b983264b
Merge branch 'apple:main' into ddneat 2022-06-07 23:10:56 -07:00
Bharadwaj V.R b40553556b
Merge pull request from sfc-gh-bvr/mcvf-nothrottle
Remove last-limited check from DDMountainChopper and DDValleyFiller
2022-06-07 21:15:47 -07:00
Yi Wu bbf8cb4b02
GetEncryptCipherKeys helper function and misc encryption changes ()
Adding GetEncryptCipherKeys and GetLatestCipherKeys helper actors, which encapsulate cipher key fetch logic: getting cipher keys from local BlobCipherKeyCache, and on cache miss fetch from EKP (encrypt key proxy). These helper actors also handles the case if EKP get shutdown in the middle, they listen on ServerDBInfo to wait for new EKP start and send new request there instead.

The PR also have other misc changes:
* EKP is by default started in simulation regardless of. ENABLE_ENCRYPTION knob, so that in restart tests, if ENABLE_ENCRYPTION is switch from on to off after restart, encrypted data will still be able to be read.
* API tweaks for BlobCipher
* Adding a ENABLE_TLOG_ENCRYPTION knob which will be used in later PRs. The knob should normally be consistent with ENABLE_ENCRYPTION knob, but could be used to disable TLog encryption alone.

This PR is split out from .
2022-06-07 21:00:13 -07:00
Jingyu Zhou 217ba24b6f Add rss_bytes to process memory and fix available_bytes calculation
Since memory is now limited with RSS size, add RSS size in status json for
reporting. Also change how available_bytes is calculated from:
  (available + virtual memory) * process_limit / machine_limit
to:
  (available memory) * process_limit / machine_limit
2022-06-07 16:44:14 -07:00
Andrew Noyes 1997e6057c
Fix a heap-use-after-free in a unit test ()
* Fix a heap-use-after-free in a unit test

The data passed to IAsyncFile::write must remain valid until the future
is ready.

* Use holdWhile instead of a new state variable
2022-06-07 14:48:01 -07:00
Josh Slocum a0bb585260
Merge pull request from sfc-gh-jslocum/blob_metadata_valgrind_fix
fixes for blob metadata memory from valgrind
2022-06-07 15:24:11 -05:00
Andrew Noyes 1f8fc32f41
Save a memcpy in the tlog peek path () 2022-06-07 13:22:56 -07:00
Xiaoxi Wang 21e7e6d2ba add DDTxnProcessor (incomplete) 2022-06-07 11:58:16 -07:00
Josh Slocum ae865027d6 fixes for blob metadata memory from valgrind 2022-06-07 13:50:11 -05:00
Xiaoxi Wang 541f98e111 create DDTxnProcessor 2022-06-07 11:48:59 -07:00
Sreenath Bodagala 96a88e3847 Merge remote-tracking branch 'apple-upstream/main' 2022-06-07 18:38:35 +00:00
A.J. Beamon 4f308b34fc Fix an off-by-one error in determining whether to include the entire range in the conflict ranges when a reverse range read returns early due to limit. 2022-06-07 08:52:10 -07:00
Yao Xiao 5f1a061e3a
Disable rocksdb metrics. () 2022-06-06 14:27:41 -07:00
Bharadwaj V.R aa84f8925e
Merge branch 'apple:main' into mcvf-nothrottle 2022-06-06 13:18:11 -07:00
Dan Adkins bd47f390bd
Add simulation test for three_data_hall configuration ()
* Add simulation test for 1 data hall + 1 machine failure case.

* Disable BUGGIFY for DEGRADED_RESET_INTERVAL.

A simulation test discovered a situation where machines attempting to connect
to a dead coordinator (with a well-known endpoint) were getting themselves
marked degraded. This flapping of the degraded state prevented recovery from
completing, as it started over any time it noticed that tlogs on degraded
hosts could be relocated to non-degraded ones.

bin/fdbserver -r simulation -f tests/rare/CycleWithDeadHall.toml -b on -s 276841956
2022-06-06 13:14:49 -07:00
Bharadwaj V.R 990c789a5c
Increase quiet-database timeout when buggify is on; data-movements in simulation take longer than the timeout allows, and waiting for quiet-database does succeed when given some more time () 2022-06-06 13:13:11 -07:00
Josh Slocum a3289f9cab adding tenant prefix to bg ranges call 2022-06-06 14:09:10 -05:00
Bharadwaj V.R 7f079a6c29
Merge branch 'apple:main' into mcvf-nothrottle 2022-06-06 12:03:13 -07:00
Bharadwaj V.R 418205eeab Use bindings for brevity in DDTC UT and a few places where server_info is iterated over 2022-06-06 11:56:48 -07:00
A.J. Beamon 90625ba20d Update the create tenant transaction to take the ID as a parameter. Generate unique IDs for multiple creations in the same transaction. Don't set lock aware options inside the tenant transaction code. 2022-06-06 09:45:14 -07:00
A.J. Beamon eef2dfd84b Update test to exercise multiple tenant creation 2022-06-06 09:45:14 -07:00
Sreenath Bodagala 3ec76b4b53 - Address a review comment 2022-06-03 21:20:32 +00:00
Sreenath Bodagala a3c6ed2e86 - Introduce a knob that will control the placement of the commit
versions of remote storage servers in version vector. This optimization
will help reduce the size of version vector in HA configuration.
2022-06-03 19:29:54 +00:00
Josh Slocum ff643cce76 compile fix 2022-06-03 11:50:33 -05:00
Josh Slocum b650410a48 Merge branch 'main' into blob_granule_kms 2022-06-03 09:13:49 -05:00
Josh Slocum fcd20c479d addressing review comments 2022-06-03 08:36:07 -05:00
Bharadwaj V.R 083fe01022 More uses of structured bindings to avoid use of .first and .second in pairs 2022-06-02 23:07:23 -07:00
Ata E Husain Bohra b66509eff0
Make EncryptKeyServer and KmsConnector API to be 'tenant' name aware ()
Description

Major changes proposed include:
1. Update EncryptKeyServer APIs to be tenant aware.
2. Update KmsConnector APIs to be tenant aware

Client of above APIs such as: CP, SS and BlobWorker need to supply
encryption domain info that includes: tenantId and tenantName

Testing

1. Update EncryptKeyProxyTest
2. Update RESTKmsConnectorTest
3. Update SimKmsConnectorTest
2022-06-02 11:55:50 -07:00
Yao Xiao c75611bf94
[ShardedRocksDB] 2/N Support range read and integrate with read iterator pool. () 2022-06-02 11:03:49 -07:00
Junhyun Shim 3e79735b2f
Authz JWT support ()
* Add JWT support to TokenSign

* Encapsulate OpenSSL public/private key type

Type-safe passing around of keys without having to DER/PEM-serialize
(OpenSSL doesn't have distinct types for public and private key)

* Apply Clang format

* Add verify benchmark for JWT and FlatBuffers token

* Unit test base64url::{encode, decode}

* Make all payload fields optional

Let user code validate non-signature fields

* Make all payload fields optional

Completely defer field check to user code

* Move rapidjson from fdbclient to contrib

* Make fdbrpc's rapidjson linkage private

Currently only sources include them.

* Modify rapidjson path in apiversioner.py

* Algorithm::Unknown > Algorithm::UNKNOWN
2022-06-02 13:22:50 +02:00
neethuhaneesha 768655992c
Merge pull request from neethuhaneesha/traceevent
Removing trace event invalid character causing simulation harness to fail.
2022-06-01 21:35:56 -07:00
Andrew Noyes 2e087a6ec6
Fix some spammy trace events ()
* Exponential backoff for some GlobalConfig retry loops

* Fix incorrect usage of random01() <= p idiom
2022-06-01 16:49:25 -07:00
neethuhaneesha 410ab6352f Traceevent correction. 2022-06-01 15:21:15 -07:00
sfc-gh-tclinkenbeard d5e7981ca1 Add ClientTagThrottleLimits::NO_EXPIRATION static constant 2022-06-01 13:02:18 -07:00
Bharadwaj V.R f7c8d598c0
Merge branch 'apple:main' into mcvf-nothrottle 2022-06-01 11:33:00 -07:00
Josh Slocum 567b1d35f7 Full integration with BlobConnectionProvider for blob granules 2022-06-01 12:39:51 -05:00
Evan Tschannen 473edf3d11
fix: the peek_using_streaming can cause memory corruption ()
* fix: the peek_using_streaming can cause memory corruption

* changed how ALLOW_DANGEROUS_KNOBS is initialized

* only buggify streaming when simulated
2022-05-31 16:04:28 -07:00
sfc-gh-tclinkenbeard 29ebcdbfa9 Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-05-31 14:53:51 -07:00
Mohamed Oulmahdi 3c4c485ef2 Enable Windows tests 2022-05-31 12:01:57 +02:00
Bharadwaj V.R 24b2be1c4f Remove last-limited check from DDMountainChopper and DDValleyFiller 2022-05-30 21:57:34 -07:00
Xiaoxi Wang 9b8859f4f2 move keys out of StorageMetrics 2022-05-27 17:10:01 -07:00
Josh Slocum ffa4255c65 Added blob metadata concept as new secret type, and verified blob workers can load it 2022-05-27 15:15:56 -05:00
Xiaoxi Wang 4fb2e90be9 add comment 2022-05-27 12:14:34 -07:00
Xiaoxi Wang 173bcfc528
Merge pull request from sfc-gh-xwang/readaware
Fix heap-use-after-free caused by early noErrorsActors destroy
2022-05-27 11:35:11 -07:00
Xiaoxi Wang 74748c20a0 a.fix heap-use-after-free caused by early noErrorsActors destroy 2022-05-27 10:14:10 -07:00
Jingyu Zhou ae5818afa8
Merge pull request from jzhou77/fix-7109
CC sends recovery txn version during TLog recruitment
2022-05-27 09:27:19 -07:00
Xiaoxi Wang 85d1b59172 fix heap-use-after-free caused by early noErrorsActors destroy 2022-05-26 15:55:14 -07:00
Sreenath Bodagala 4ccaacdd59
Merge pull request from sbodagala/main
Make sequencer accept the recovery transaction version unconditionally
2022-05-26 16:38:57 -04:00
sfc-gh-tclinkenbeard 67a90d73bd Add GlobalTagThrottlerImpl::tracer 2022-05-26 11:40:12 -07:00
Xiaoxi Wang 5bea02cfde
Merge pull request from sfc-gh-xwang/readaware
Read-aware Data Distributor (default disabled)
2022-05-26 11:05:03 -07:00
Yao Xiao df3d34f8ac
[ShardedRocksDB] 1/N Implement functions for write and single shard read. () 2022-05-26 10:59:14 -07:00
Sreenath Bodagala 0402de9085 - Make sequencer accept the recovery transaction version unconditionally.
Cluster controller could send multiple recovery transaction versions
and not accpeting them unconditionally could cause a discrepancy between
the recovery transaction versions on the sequencer and the resolvers,
resulting in a hung recovery (because the cluster controller won't be able
to commit the recovery transaction version).
2022-05-26 13:37:12 +00:00
Xiaoxi Wang 13a77dd5a2 change priority knob; change PromiseStream to FutureStream; remove comments; add on_sr check 2022-05-25 17:09:34 -07:00
Josh Slocum 458e8018e1 review comments 2022-05-25 17:16:56 -05:00
Josh Slocum dd637dd6a7 passes tenant simulation test 2022-05-25 17:16:56 -05:00
Josh Slocum e3a570d50d Blob worker tenant integration mostly works 2022-05-25 17:16:56 -05:00
Josh Slocum 85af0a25b2 Enabling BM to understand tenant boundaries, and changing BlobGranuleCorrectness to use tenants 2022-05-25 17:16:56 -05:00
Josh Slocum ad54be5d0b Enabling tenant tests for blob granules and fixing bug 2022-05-25 17:16:56 -05:00
Xiaoxi Wang 5816890dfc Merge branch 'main' of https://github.com/apple/foundationdb into readaware 2022-05-25 14:48:28 -07:00
Jingyu Zhou c1b91443fe Fix a storage cache bug that prevents it from peeking
The two event handlers of "onChange", if run in a particular order, will result
in an empty cursor, thus preventing SC from peeking data from TLogs.
2022-05-25 12:28:57 -07:00
Andrew Noyes 6f500b59c0
Fix a heap-use-after-free in PaxosConfigConsumer.actor.cpp ()
* Fix a heap-use-after-free in PaxosConfigConsumer.actor.cpp

* Two more defensive local promises

* Two more defensive promise copies

* Fix latent logic error
2022-05-25 12:08:30 -07:00
Jingyu Zhou 75e9774197
Merge pull request from sfc-gh-anoyes/anoyes/revert-5637-main
Revert most logic in 
2022-05-24 18:00:37 -07:00
Andrew Noyes 665e903999
Fix use of uninitialized memory ()
We branch on the value of cf, so we need to initialize it.
2022-05-24 14:58:08 -07:00
Jingyu Zhou b2fded5c51 CC sends recovery txn version during TLog recruitment
This simplifies the logic for TLog to wait for recovery txn before replying
back to peeks.
2022-05-24 14:57:55 -07:00
Andrew Noyes 53882ef741 Revert most logic in 2022-05-24 12:23:49 -07:00
Xiaoxi Wang 4cbec5c742
Merge branch 'apple:main' into features/debug-macro 2022-05-24 09:12:39 -07:00
Zhe Wu cb73352e36 Don't pop every generation of old log router 2022-05-24 08:47:57 -07:00
Xiaoxi Wang fec8a47a5d makeReference 2022-05-23 16:50:04 -07:00
Yao Xiao 6bf1e3921f
Add skeleton for sharded rocksdb KVS. () 2022-05-23 15:29:23 -07:00
Xiaoxi Wang fd35fde481 Merge branch 'main' of https://github.com/apple/foundationdb into readaware 2022-05-23 15:09:03 -07:00
sfc-gh-tclinkenbeard 1cc9a5284c Avoid printing warnings in LocalConfiguration::ManualKnobOverrides constructor 2022-05-23 13:41:48 -07:00
Lukas Joswiak 619c056f17 Add unit tests for reference version function
Factors the updated version calculation path into a function and adds
unit tests for it. Some of the important test paths include making sure
the calculated version always increases, and to check issues with
overflowing integers.
2022-05-23 11:45:18 -07:00
Renxuan Wang df4e0deb4d
coordinatorsKey should not always store IP addresses. ()
* coordinatorsKey should not storing IP addresses.

Currently, when we do a commit of coordinator change, we are always converting hostnames to IP addresses and store the converted results in coordinatorsKey (\xff/coordinators). This result in ForwardRequest also sending IP addresses, and receivers will update their cluster files with IPs, then we lose the dynamic IP feature.

* Remove the legacy coordinators() function.

* Update async_resolve().

ip::basic_resolver::async_resolve(const query & q, ResolveHandler && handler) is deprecated.

* Clean code format.

* Fix typo.

* Remove SpecifiedQuorumChange and NoQuorumChange.
2022-05-23 11:42:56 -07:00
Xiaoxi Wang 73624bcd2a Merge remote-tracking branch 'upstream/main' into readaware 2022-05-23 11:17:38 -07:00
Xiaoxi Wang 54e56af3db solve some review comments 2022-05-23 11:04:37 -07:00
Josh Slocum 4015b5b2a0
Several Blob Granule bug fixes found in nightlies ()
* Fixing simulation validation assert that was tripping incorrectly

* Commenting out debugging prints

* Fixed multiple error propagation issues in blob worker
2022-05-23 10:07:16 -07:00
Xiaoxi Wang 3fee0f33b5 change reference pointer 2022-05-23 00:12:48 -07:00
Xiaoxi Wang 27a60df36d fix rename bug 2022-05-22 23:37:32 -07:00
Xiaoxi Wang 0579b577ba remove polling interval; uncomment suppressFor 2022-05-22 23:35:39 -07:00
Xiaoxi Wang 909a7a92a1 rename preferLowerDiskUtil 2022-05-22 23:32:13 -07:00
Steve Atherton c073f113a5
Explicitly cancel byte sample recovery on failure of a recovered storage server to prevent it from trying to read from the IKeyValueStore after shutdown. () 2022-05-20 19:55:52 -07:00
Xiaoxi Wang 5a431980d2 Merge branch 'main' of https://github.com/apple/foundationdb into features/debug-macro 2022-05-20 12:18:20 -07:00
Xiaoxi Wang 6b996dca29 add debug macro 2022-05-20 12:17:45 -07:00
Ray Jenkins dcd771bd07
Use semicolon for consistency with all other spans. () 2022-05-20 10:18:00 -05:00
He Liu 78dc7c5d77 Resolving comments. 2022-05-19 13:27:21 -07:00
He Liu 54c566e57d Drop RocksDB column family before create a new column family from
import.
2022-05-19 13:27:21 -07:00
He Liu 61490022b4 Enabled checkpoint, restore test for RocksDB format. 2022-05-19 13:27:21 -07:00
He Liu bc509d9572 Added fetchCheckpointKeyValuesQ in storage server. 2022-05-19 13:27:21 -07:00
He Liu 05bbe174c3 Implemented checkpoint(), restore() for KeyValueStoreRocksDB, for the
new format.
2022-05-19 13:27:21 -07:00
He Liu 5233d2a6ac ServerCheckpoint.actor.* 2022-05-19 13:27:21 -07:00
He Liu f8dd9acc7f Cleaned up RocksDBCheckpointUtil* 2022-05-19 13:27:21 -07:00
He Liu 9797a2b663 Added StorageServerInterface::fetchCheckpointKeyValues API. 2022-05-19 13:27:21 -07:00
Xiaoxi Wang 4f28af1ab7 add comment 2022-05-19 10:50:24 -07:00
Trevor Clinkenbeard d7f0928a48
Merge pull request from sfc-gh-bvr/ddspruce
Minor readability improvement (I believe) to DD code
2022-05-19 08:45:22 -07:00
Xiaoxi Wang 6c11fc74ba add debug traces 2022-05-18 15:20:23 -07:00
Xiaoxi Wang 7541fb9a25 address some review comments 2022-05-18 13:39:07 -07:00
Xiaoxi Wang 5355a31bda adjust team comparison inflight penalty 2022-05-18 13:21:06 -07:00
Trevor Clinkenbeard b55b67641c
Fix -Wlogical-op-parentheses warning () 2022-05-18 12:31:43 -07:00
Hao Fu dcacb30688
Add missing secondary queries tests for index prefetch ()
* Add missing secondary queries tests for index prefetch

This change adds test for missing secondary queries for index prefetch,
in this case, MATCHED_ONLY mode would NOT return KV and UNMATCHED_ONLY
mode would return KV.

* remove default value for params
2022-05-18 12:13:19 -07:00
Xiaoxi Wang 8adf38ba08 Merge branch 'main' of https://github.com/apple/foundationdb into readaware 2022-05-18 10:11:18 -07:00
Hao Fu f00606fd71
Enable MATCHED and UNMATCHED mode for index prefetch ()
* Enable MATCHED and UNMATCHED mode for index prefetch

MATCHED mode returns index entries whose secondary KVs are present,
UNMATCHED mode returns index entries whose secondary KVs are absent.

Note that the conflict read range of this txn is set in 2 steps:
* Set the conflict range for primary query according to request
* Set the conflict ranges for secondary queries according to responses.

As a result, conflicts of different match_index mode are taken care of.

* Fix c binding
2022-05-18 09:16:28 -07:00
Ata E Husain Bohra 728869466d
Update EncryptBaseCipher cache to be index using {baseCipherId, domainId} ()
Description

Major changes proposed in the patch includes:
1. Update EncryptKeyProxy EncyrptBaseCipherKeyId cache to be indexed
   using {encryptDomainId, baseCipherId} instead of only 'baseCipherId'
2. Enhance RESTKmsConnector 'error' tag to encapsulte: errorMessage
   and errorCode information

Testing

1. Updated EncyrptKeyProxy test
2. Updated RESTKmsConnector unit test
2022-05-18 06:16:40 -07:00