Commit Graph

3213 Commits

Author SHA1 Message Date
Steve Atherton 2bf90ca5ec Change KAIO latency metrics to use LatencySample for easier usability. Rename a SQLite-specific knob to indicate it is specific to SQLite. 2022-09-15 13:27:23 -07:00
Ata E Husain Bohra b540a3d6b9
Disable zlib find_package, effectively disable gzip compression (#8179)
Description

find_package was used to find and link `zlib` library needed to enable
boost::gzip compression filter. However, the code adds dynamic linkage
of zlib shared object with generated binaries (fdbserver for instance).

For now disable the ZLIB find code to effectively disable GZIP compression
support.

Testing
2022-09-14 14:03:13 -07:00
Josh Slocum d4ba6c266c
Merge pull request #8176 from sfc-gh-jslocum/ss_cf_burst_fix_main
Fixing Thundering Herd problem of change feed stream retries in SS
2022-09-14 16:01:20 -05:00
Ata E Husain Bohra d2b82d2c46
Introduce "default encryption domain" (#8139)
* Introduce "default encryption domain"

Description

In current FDB native encryption data at-rest implementation,
an entity getting encrypted (mutation, KV and/or file) is categorized
into one of following encryption domains:
1. Tenant domain, where, Encryption domain == Tenant boundaries
2. FDB system keyspace - FDB metadata encryption domain
3. FDB Encryption Header domain - used to generate digest for
plaintext EncryptionHeader.

The scheme doesn't support encryption if an entity can't be categorized
into any of above mentioned encryption domains, for instance, non-tenant
mutations are NOT supported.

Patch extend the encryption support for mutations for which corresponding
Tenant information can't be obtained (Key length shorter than TenantPrefix)
and/or mutations do not belong to any valid Tenant
(FDB management cluster data) by mapping such mutations to a
"default encryption domain".

TODO

CommitProxy driven TLog encryption implementation requires every transaction
mutation to contain 1 KV, not crossing Tenant-boundaries. Only exception to
this rule is ClearRange mutations. For now ClearRange mutations are mapped
to 'default encryption domain', in subsequent patch appropriate handling
for ClearRange mutations shall be proposed.

Testing

devRunCorrectness - 100k
2022-09-14 10:58:32 -07:00
Josh Slocum 3e5e49b635 Operational improvements to limit thundering herd effect of many change feed queries being retried simultaneously 2022-09-14 09:57:21 -05:00
Markus Pilman 59ce49913a
Merge pull request #8146 from sfc-gh-tclinkenbeard/improve-code-coverage
Increase the number of unit tests run in `RandomUnitTests.toml`
2022-09-12 15:10:47 -06:00
sfc-gh-tclinkenbeard 39c6989673 Remove some simulation unit tests.
These tests should not be run in simulation, because they either run too
long or break determinism.
2022-09-11 00:36:18 -07:00
sfc-gh-tclinkenbeard 5dbbd73879 Fix typo in __eraseDirectoryRecursiveCount variable name 2022-09-11 00:36:13 -07:00
Yi Wu d831c87d14
Add encryption metrics (#8070)
Adding the following metrics:
* BlobCipherKeyCache hit/miss
* EKP: KMS requests latencies
* For each component that using encryption, they now need to pass a UsageType enum to the encryption helper methods (GetEncryptCipherKeys/GetLatestEncryptCipherKey/encrypt/decrypt) and those methods will help to log get cipher key latency samples and encryption/decryption cpu times accordingly.
2022-09-09 18:43:09 -07:00
Russell Sears 73f65c3192 Fix duplicate (and broken) header macro FDBCLIENT_EVENTTYPES[S]_ACTOR[_G]_H 2022-09-09 19:14:30 +00:00
Junhyun Shim bc47f90aff
Merge pull request #8125 from sfc-gh-jshim/knob-tokenless-tenant-access
Add a knob to allow token-less tenant data access for untrusted clients
2022-09-08 17:52:32 +02:00
Andrew Noyes bbc30c6a80
Assert that Arena's appear last in serializer calls (#8078)
* Assert that arena's appear last in serializer calls

* Fix all occurrences of Arena's not appearing last in serializer call

* Work around issue from Standalone inheriting from Arena privately

* Attempt to fix windows build

Use fb_ prefix instead of detail namespace to scope implementation
details in headers
2022-09-08 08:31:14 -07:00
A.J. Beamon 726d5215a0
Remove API 720 guards for tenants (experimental feature) and the cluster ID special keys (#8108)
* Remove API 720 guards for tenants (experimental feature) and the cluster ID special keys (no need to guard)

* Enable the relaxed special key access in transactions that need to use special key-space APIs introduced in 7.2
2022-09-08 17:22:36 +02:00
Junhyun Shim 3023096962 Add a knob to allow token-less tenant data access for untrusted clients 2022-09-08 14:53:01 +02:00
Andrew Noyes fbf5830bb2 Rollback #7374
Valgrind is complaining about use of uninitialized memory in
absl::GetStackTrace, and the cases where it complains the backtraces are
incomplete. Note: this means that jemalloc heap profiling no longer
works out of the box. Advanced users who want to enable jemalloc heap
profiling will now have to revert this change and build from source.
2022-09-06 16:55:18 -07:00
Dennis Zhou d9e7fc1245 ApiVersion: fix TraceFile apiversion check 2022-09-06 12:02:50 -07:00
Dennis Zhou b2ae592b51
Merge pull request #8082 from sfc-gh-vgasiunas/vgasiunas-api-version
ApiVersion: Small cleanups
2022-09-06 10:03:45 -07:00
Junhyun Shim f2e68d0566
Merge pull request #8102 from sfc-gh-jshim/fdbcli-tls-connect
Make FDBCLI check coordinator :tls suffix
2022-09-06 16:17:49 +02:00
Junhyun Shim 738a101a58 Add test for fdbcli's coordinator TLS suffix check 2022-09-05 19:27:22 +02:00
Vaidas Gasiunas 8ca8691837 ApiVersion: Minor clean ups 2022-09-05 10:42:42 +02:00
sfc-gh-tclinkenbeard 3dec9749d3 Mark PromiseStream::send non-const 2022-09-02 10:41:56 -07:00
Dennis Zhou 80a0816157
flow: switch from hard coded to ApiVersion like ProtocolVersion (#8071)
* flow: add ApiVersion to replace hard coding api version

Instead of hard coding api value, let's rely on feature versions akin to
ProtocolVersion.

* ApiVersion: remove use of -1 for latest and use LATEST_VERSION
2022-09-02 09:28:13 +02:00
Andrew Noyes 475ed4b1dc
Improve memory safety (#8069)
* Move arena members to the end of serializer calls

See
https://github.com/apple/foundationdb/tree/main/flow#flatbuffersobjectserializer
for why this is necessary.

* Fix a heap-use-after-free

Previously memory owned by
EncryptKeyProxyData::baseCipherDomainIdKeyIdCache was borrowed by a call
to EncryptKeyProxyData::insertIntoBaseDomainIdCache where it was
invalidated and then used. Now
EncryptKeyProxyData::insertIntoBaseDomainIdCache takes shared ownership
by taking a Standalone.

And also rename some types to end in Ref to follow the flow conventions
described here: https://github.com/apple/foundationdb/tree/main/flow#arenas
2022-09-01 12:47:03 -07:00
Josh Slocum d90cdcc498
Adding new retryable error type for blob granule requests (#8023) 2022-08-30 15:07:10 +02:00
Junhyun Shim ac6889286c
Merge pull request #7731 from sfc-gh-jshim/authz-general-tls-and-integration-test
Authz general tls and integration test
2022-08-30 02:19:11 +02:00
Dennis Zhou cd06f8b0f1
Merge pull request #8013 from sfc-gh-dzhou/patch-version
flow: move the protocol version least significant bit mask to cmake
2022-08-29 12:14:40 -07:00
Junhyun Shim f7ef5edab4 Merge remote-tracking branch 'origin/main' into authz-general-tls-and-integration-test 2022-08-29 16:35:57 +02:00
Junhyun Shim 71486cccb1
Make envvar access in envvar-knob parsing cross-platform (#7999)
* Make envvar access in envvar-knob parsing cross-platform

Variable `environ' is defined for Linux,
does not exist in Mac, and is deprecated in Windows

* Prevent env knob strings from being copied at each iteration

* Add headers for {Get|Free}EnvironmentStrings()

* Adjust for different memory layout of environ vs GetEnvironmentStrings()

GetEnvironmentStrings returns a single byte string
with adjacent key=value strings delimited with null bytes,
whereas environ is an array of key=value strings.

* Fix missing return value for Windows build

* Have just one return statement
2022-08-29 14:15:03 +02:00
Dennis Zhou cf73a14e8c flow: move the protocol version least significant bit mask to cmake 2022-08-26 22:09:51 -07:00
Junhyun Shim c2f577dac8 Add key type and DS algorithm dimension to TokenSign benchmark
Also
- Measure performance with RSA keys
- Make RSA key 2048 > 4096 bits
2022-08-26 22:58:36 +02:00
Markus Pilman 98039f6ca1 Merge remote-tracking branch 'origin/main' into features/new-test-harness 2022-08-26 13:52:25 -06:00
Junhyun Shim 6bcfbf421e Merge remote-tracking branch 'origin/main' into authz-general-tls-and-integration-test 2022-08-26 09:20:31 +02:00
Dennis Zhou c8ded2556a flow: allow for patch version to be set again for protocol version
While only major and minor version matters for fdb releases regarding
protocol version, this makes testing a little bit easier.
2022-08-25 12:50:34 -07:00
Jingyu Zhou c2c2b9553b
Merge pull request #7765 from apple/env
Set knobs using environment variables when running Joshua
2022-08-25 11:42:57 -07:00
Ata E Husain Bohra 00fe4863b6
Implement TenantCacheEntry in-memory cache (#7801)
* Implement TenantCacheEntry in-memory cache

Description

  diff-4: TraceEvent usage improvements 
  diff-3: Address review comments
  diff-2: Add APIs to read counter values, test improvements
  diff-1: Address review comments

Major changes includes:
1. Implements an actor that enables an in-memory caching of
TenantCacheEntry object, allowing the caller to embed custom
information along with TenantCacheEntry.
2. The cache follows read-through cache semantics where the entry
gets loaded from underlying database on a miss.
3. The cache implements a "periodic poller" to refresh known Tenants
by consulting the database. Once a database keyrange-watch feature is
available, cache shall be updated.

Bonus:
Implement a 'recurringAsync' addition to genericActors allowing caller
to schedule a periodic task registering an "actor functor"; the routine
'waits' for the actor unlike existing 'recurring' implementation.

Testing

TenantEntryCache workload
devCorrectnessRun - 100K
2022-08-25 11:42:26 -07:00
Dennis Zhou 364be0bc78
Merge pull request #7977 from sfc-gh-dzhou/versioning
flow: move protocol versions to a cmake generated file
2022-08-24 14:16:47 -07:00
Dennis Zhou 932ea74a63 flow: move protocol versions to a cmake generated file 2022-08-24 12:24:01 -07:00
Dan Lambright a61d9d1cd2 Merge remote-tracking branch 'origin' into env 2022-08-24 13:06:47 -04:00
Chaoguang Lin 06aa6ee5ff
Add system monitor for flowprocess (#6925)
* Update network address in trace logs; Add system monitor for flowprocess

* Create a new trace file with the correct process address for flowprocess

* Remove unused debugging traces

* Add a new error lock_file_failure; Change please_reboot_remote_kv_store to please_reboot_kv_store; Add the code to only reboot the kv store but not the worker; Remove some unnecessay traces

* Add error handling for file_not_found in handleIOErrors

* Format worker.actor.cpp file
2022-08-24 00:40:38 -07:00
Trevor Clinkenbeard c41e6090f6
Merge pull request #7624 from sfc-gh-dadkins/sfc-gh-dadkins/bugs/7619
Fix parsing of knob values to reject invalid values.
2022-08-23 22:43:08 -07:00
Dan Lambright 50be189a0f Merge remote-tracking branch 'origin' into env 2022-08-23 17:01:48 -04:00
Marian Dvorsky 3a53ec3115
Call getTraceThreadId() before we enable allocation tracing (#7888) 2022-08-23 20:25:08 +02:00
Junhyun Shim 964dec9b91 Fix incorrect clang format 2022-08-23 19:48:02 +02:00
Trevor Clinkenbeard e83b21d21f
Mark value maybe_unused in /flow/Knobs/ParseKnobValue 2022-08-23 10:16:16 -07:00
Junhyun Shim c21d8830a2 Revert "Apply clang format"
This reverts commit 11b8be6f3d.
2022-08-23 19:12:57 +02:00
Junhyun Shim 11b8be6f3d Apply clang format 2022-08-23 19:05:45 +02:00
Junhyun Shim 8706833355 Further clang-format Net2.actor.cpp 2022-08-23 18:24:11 +02:00
Junhyun Shim de2e51877f Clang format Net2.actor.cpp 2022-08-23 18:00:24 +02:00
Markus Pilman 180024b76d implemented testClass and testPriority 2022-08-22 09:57:44 -06:00
Junhyun Shim a312002333 Merge remote-tracking branch 'origin/main' into authz-general-tls-and-integration-test 2022-08-17 17:32:00 +02:00