Commit Graph

307 Commits

Author SHA1 Message Date
Yi Wu 3287098b4a EaR: Handle KMS timeout in storage server and commit proxy 2023-08-28 16:17:43 -07:00
Nim Wijetunga 7f2260bbd2
Add Encryption Related Latency Metrics (#10596)
* add ss and cp latency metrics

* make changes
2023-07-14 11:30:16 -07:00
Ata E Husain Bohra 7779c908b3
EaR: Remove usage of ENABLE_CONFIGURABLE_ENCRYPTION knob (#10570)
Description

Given Configurable encryption has been checked in and being tested via
simulation for more than a month and also to avoid penalty of accessing
KNOBS in inline commit path, patch retires the KNOB and make
ConfigurationEncryption default EaR mode for FDB.

BlobCipher still supports the old format header and encryption semantics,
will remove the dead code as a followup PR.

Testing

devRunCorrectness - 100K
2023-06-30 17:48:09 -07:00
Evan Tschannen ef682d304e fix IKeyValueStore include 2023-06-16 13:28:40 -07:00
Evan Tschannen 359e178dcd Merge branch 'main' into feature-durable-change-feed
# Conflicts:
#	fdbclient/ClientKnobs.cpp
#	fdbserver/BlobManager.actor.cpp
#	fdbserver/worker.actor.cpp
2023-06-11 13:58:35 -07:00
Jingyu Zhou f210cf708d
Merge pull request #10436 from jzhou77/main
Add getlocation and getall fdbcli debug commands
2023-06-08 22:05:03 -07:00
Jingyu Zhou 66b0699774 Fix IDE build 2023-06-08 16:59:17 -07:00
Dan Adkins da54faed5b
Replace calls to now() with timer_monotonic() when measuring durations. (#10308)
now() is only updated in the run loop, so timer() is more appropriate
for accurate measurements of latency. This change is limited to the
commit proxy server, where we observed inaccurate latency statistics.
2023-06-07 22:09:23 -04:00
Jingyu Zhou 1a8f3445ff Remove unused state variables 2023-05-18 12:23:22 -07:00
A.J. Beamon d8141c049d Add code probes for tenant code 2023-05-10 20:44:39 -07:00
Evan Tschannen 3dd86d6c22 move IKeyValueStore.h to the client 2023-05-10 15:41:47 -07:00
Jingyu Zhou 980c71d321 Buggify tenantIdServer with commit_proxy_memory_limit_exceeded error 2023-04-19 16:12:21 -07:00
Jingyu Zhou b49625d45b Properly handle proxy_memory_limit_exceeded error for GetKeyServerLocationsRequest
Also add buggify to inject the error in simulation.
2023-04-19 09:35:09 -07:00
Nim Wijetunga c780d706d1
Remove EKP Interface from ServerDBInfo (#9909)
Remove ekp interface from ServerDBInfo
2023-04-06 11:35:47 -07:00
Nim Wijetunga 6e4e6ab2f4
Revert "Revert "Refactor GetEncryptCipherKeys (#9600)"" (#9903)
* Revert "Revert "Refactor GetEncryptCipherKeys (#9600)" (#9708)"
2023-04-05 10:03:48 -07:00
Ata E Husain Bohra dbcab0b1bd
Revert "Refactor GetEncryptCipherKeys (#9600)" (#9708)
This reverts commit 2702665e35.
2023-03-15 12:10:08 -07:00
Nim Wijetunga 2702665e35
Refactor GetEncryptCipherKeys (#9600)
* inital commit

* address pr comments
2023-03-08 17:05:03 -08:00
A.J. Beamon 55b752edf1 Check transaction validity with respect to tenants even if it will fail with a conflict. This allows us to report the appropriate non-retryable error instead. 2023-02-28 15:47:00 -08:00
Jingyu Zhou a350a929b9
Merge pull request #9494 from sfc-gh-jslocum/bg_cp_improvements
addressing review comments and fixmes in bg commit proxy code
2023-02-28 12:30:58 -08:00
Lukas Joswiak 47fc53ed6e Adds more detailed mutation logging to commit proxy
The commit proxy writes a `ProxyMetrics` trace every 5 seconds. This
event contains a lot of useful information, such as the number of commit
batches that arrived and exited, the number of mutations processed, the
number of bytes those mutations made up, etc.. However, it is difficult
to tell what the workload pattern looks like within these 5 second
intervals when the metrics are being calculated.

This PR adds a new trace, `ProxyDetailedMetrics`, which logs itself
every 100ms. It currently only writes the number of mutations and the
number of mutation bytes that arrived during the 100ms time period. But
it should be easy to add more metrics in the future.

It's possible this increased logging could cause issues. Based off a
simulation run of the `WriteDuringRead` test, I got the following
results:

```
$ rg ProxyDetailedMetrics trace.json | wc -l
    6877
$ rg "Roles\": \".*CP.*\"" trace.json | wc -l
   11402
$ wc -l trace.json
   96147 trace.json
```

So on processes running as a commit proxy, this approximately doubled
the number of lines logged. But relative to the cluster overall, it only
added about 5% overhead.

If we want to reduce this number, one possibility would be to not write
a trace if all the values being written are 0. I'm not sure if this
would help much in production, but in simulation the large majority of
the traces (99%+) consist of zero values.
2023-02-28 09:48:39 -08:00
Josh Slocum 716a9c3817 addressing review comments and fixmes in bg commit proxy code 2023-02-27 10:51:47 -06:00
Josh Slocum 6187811f71
Reworking getBlobGranuleRanges to also use commit proxy rpc for authz, and adding test (#9470) 2023-02-24 17:15:32 -06:00
Nim Wijetunga 29819b0645
Change Feed Bug Fix + Encryption Asserts (#9457)
* add encryption asserts

* modify function name

* address pr comments

* address pr comments

* Trigger Build
2023-02-23 19:33:25 -08:00
Markus Pilman 15d8548c0e Merge remote-tracking branch 'origin/main' into features/tenant-lock2
# Conflicts:
#	fdbserver/ApplyMetadataMutation.cpp
#	fdbserver/storageserver.actor.cpp
2023-02-21 13:39:35 -07:00
Josh Slocum 958f3b531b
Plumbing blob worker mapping through commit proxy like storage server (#9401)
* Plumbing blob worker mapping through commit proxy like storage server mapping

* review comments

* formatting
2023-02-21 13:21:44 -06:00
Junhyun Shim 2497aa5701
Clamp GetKeyServerLocations result to tenant prefix (#9424) 2023-02-21 18:55:24 +01:00
Yi Wu eac757d186
EaR: cleanup encryption knobs (#9386)
Changes:
* Cleanup all encryption knobs 
* Update simulated cluster to randomly enable encryption with higher probability
2023-02-18 13:18:20 -08:00
Ata E Husain Bohra 99b23ac04d
EaR: Configurable encryption support for Tlog mutations (#9394)
* EaR: Configurable encryption support for TLog mutations

Description

  diff-1 : Address review comments

Major changes includes:
1. Update the code involved in ensuring Tlog mutation encryption to be
compliant with "configurable encryption" feature.
2. Update ENABLE_CONFIGURABLE_ENCRYPTION flag to be 'true' by default
and BUGGIFY it.

Testing

devRunCorrectness - 100K
2023-02-16 19:01:59 -08:00
Nim Wijetunga bf85c9f8af
Backup Mutation Log Separates Tenant Map Modifications During Restore (#9292)
mutation log separates tenant map modifications
2023-02-14 16:46:09 -08:00
Yi Wu fe18c87ac6
EaR: commit proxy fetch additional cipher keys post-resolution (#9308)
Commit proxy needs to fetch additional cipher keys post-resolution, since tenant ids for raw access requests and cross-tenant clear ranges are calculated after resolution.
2023-02-14 13:05:51 -08:00
Markus Pilman 3b4bd1692a
Remove unused function
Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2023-02-13 18:22:25 +01:00
Markus Pilman 3017e15448 Merge remote-tracking branch 'origin/main' into features/tenant-lock2
# Conflicts:
#	fdbclient/include/fdbclient/TenantManagement.actor.h
#	fdbserver/storageserver.actor.cpp
#	fdbserver/workloads/TenantManagementWorkload.actor.cpp
2023-02-13 11:43:07 +01:00
Xiaoxi Wang ac1ddc81b0 remove debug trace; change function comment 2023-02-11 13:17:59 -08:00
Xiaoxi Wang a0f7943fc3 simplify implementation of lowerBoundTenantId and withinSingleTenant 2023-02-10 22:14:59 -08:00
Xiaoxi Wang ffc5733e9c add comments 2023-02-10 12:51:13 -08:00
Xiaoxi Wang ffadea08cb change isSingleTenant check; add unit tests 2023-02-10 12:29:38 -08:00
Xiaoxi Wang 09da7efdc0 handle clear range when tenantMap.size() == 0 2023-02-09 22:28:18 -08:00
Xiaoxi Wang a77bf236c7 fix unit test bug 2023-02-08 16:09:32 -08:00
Xiaoxi Wang e75f38a6fc extract pushToBackupMutations method and add single tenant range validation 2023-02-08 14:35:35 -08:00
Xiaoxi Wang e28fc664d0 extract shouldBackup method 2023-02-08 13:25:46 -08:00
Markus Pilman 1c712df709 Tenant lock workload succeeding 2023-02-08 15:51:09 +01:00
Xiaoxi Wang 145b81170c add unit test for replaceRawClearRanges 2023-02-07 13:21:18 -08:00
Xiaoxi Wang 6df5f1fa56 Merge branch 'main' of https://github.com/apple/foundationdb into feature/main/clearRange 2023-02-06 14:28:35 -08:00
Yi Wu d3bc2afc8e
EaR: storage server uses encryption DB config (#9115)
The PR is updating storage server and Redwood to enable encryption based on the encryption mode in DB config, which was previously controlled by a knob. High level changes are
1. Passing encryption mode in DB config to storage server
    1.1 If it is a new storage server, pass the encryption mode through `InitializeStorageRequest`. the encryption mode is pass to Redwood for initialization
    1.2 If it is an existing storage server, on restart the storage server will send `GetStorageServerRejoinInfoRequest` to commit proxy, and commit proxy will return the current encryption mode, which it get from DB config on its own initialization. Storage server will compare the DB config encryption mode to the local storage encryption mode, and fail if they don't match
2. Adding a new `encryptionMode()` method to `IKeyValueStore`, which return a future of local encryption mode of the KV store instance. A KV store supporting encryption would need to persist its own encryption mode, and return the mode via the API.
3. Redwood accepts encryption mode from its constructor. For a new Redwood instance, caller has to specific the encryption mode, which will be stored in Redwood per-instance file header. For existing instance, caller is supposed to not passing the encryption mode, and let Redwood find it out from its own header.
4. Refactoring in Redwood to accommodate the above changes.
2023-02-06 14:02:31 -08:00
Markus Pilman 1fb3c33b3f Merge remote-tracking branch 'origin/main' into features/tenant-lock2
# Conflicts:
#	fdbserver/CommitProxyServer.actor.cpp
2023-02-06 11:58:49 +01:00
Xiaoxi Wang 3a84fc5375 fix temporary tenantMode=0 by only updating db info when recovery count increasing 2023-02-05 18:37:46 -08:00
Xiaoxi Wang 8371883e3b remove log; disabled clear range temporarily 2023-02-03 12:49:23 -08:00
Xiaoxi Wang b0902a515a handle prefix convert to negative id 2023-02-03 12:26:25 -08:00
Xiaoxi Wang 0e242226bc add trace log; fix size bug 2023-02-03 10:36:57 -08:00
Xiaoxi Wang ae6b57d5c8 handle system keys 2023-02-02 16:25:41 -08:00