Commit Graph

3470 Commits

Author SHA1 Message Date
sfc-gh-tclinkenbeard 436cdff912 Remove dead code for applyHmacKeyDerivationFunc 2022-09-20 21:08:36 -07:00
Xiaoge Su 970463223c
Merge branch 'main' into main 2022-09-20 16:56:56 -07:00
Steve Atherton ab41da174c Completely rewrote PriorityMultiLock scheduling and added a unit test for it. 2022-09-20 00:45:29 -07:00
Markus Pilman f471f3da04
Merge pull request #8227 from sfc-gh-mpilman/bugfixes/ubsan-ratecontrol
prevent int overflow
2022-09-19 17:28:00 -06:00
Markus Pilman 7581b64daa don't do the min-calculation twice 2022-09-19 15:57:46 -06:00
Markus Pilman 441ea31fca prevent int overflow 2022-09-19 15:16:53 -06:00
sfc-gh-tclinkenbeard d30697eb60 Merge remote-tracking branch 'origin/main' into improve-code-coverage 2022-09-19 12:12:19 -07:00
A.J. Beamon 4fd64630e8 Convert literal string ref instances to use _sr suffix 2022-09-19 11:35:58 -07:00
Markus Pilman e1627e0a78 Merge remote-tracking branch 'origin/main' into features/always-inject-faults 2022-09-19 09:38:55 -06:00
Steve Atherton 74b152e550 Removed two obsolete things: explicit maxPriority argument from PriorityMultiLock as it is redundant after the launch limit refactor, and the redwood read concurrency lock which is no longer needed after the StorageServer priority refactor as it will control the concurrency of requests sent to the KVS. 2022-09-18 18:23:15 -07:00
Steve Atherton 6b0eeb8efc Move PriorityMultiLock to its own header file so that changing it does not require recompiling everything. 2022-09-18 17:17:56 -07:00
Steve Atherton 07949912e4 Bug fix, launch limit check was off by 1 so a limit of 1 would not work due to use of pre-increment instead of post-increment. 2022-09-18 01:32:13 -07:00
Steve Atherton c0c9ac3bf5 Simplification, only runnerCounts workers (formerly workerCounts) and available counts in addRunner(). Renamed all uses of "worker" to "runner" for more clarity. 2022-09-18 01:13:27 -07:00
Andrew Noyes 2bdfc52f97
Fix heap use after free (#8189)
Previously, we had Ref types outliving the arena's that owned them,
specifically encryptDomains in the getResolution actor. Refactor to use
Standalone's, which both fixes the memory error and makes this easier to
reason about.

Also fix a potential ODR violation.
2022-09-16 13:46:05 -07:00
Xiaoxi Wang 7169a8b132 merge upstream/main 2022-09-15 21:27:26 -07:00
Steve Atherton 0e0a10ab45 Merge commit '59b04d46cff720df5d267daa8dc8a60c25466f74' into kaio-latency-pctile 2022-09-15 20:27:02 -07:00
sfc-gh-tclinkenbeard b273ad83ff Avoid tracing unexpected code probes 2022-09-15 16:12:51 -07:00
Fuheng Zhao ac65c3f569 merge upstream main 2022-09-15 14:19:19 -07:00
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
sfc-gh-tclinkenbeard c0fd93869c Add probe::assert::rocksDB code probe annotation 2022-09-15 11:54:02 -07:00
Markus Pilman 2d1b58d020
Update flow/Knobs.cpp
Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
2022-09-15 11:54:45 -06:00
He Liu 6f7968b618 Merge branch 'main' of https://github.com/apple/foundationdb into validate-data-consistency 2022-09-15 10:15:33 -07:00
sfc-gh-tclinkenbeard 82adc1e856 Make g_simulator a pointer 2022-09-15 09:00:33 -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
Xiaoxi Wang 1f1a66be39 merge upstream/main 2022-09-14 12:32:28 -07: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
He Liu 958b28497e Merge branch 'main' of https://github.com/apple/foundationdb into validate-data-consistency 2022-09-13 13:55:01 -07:00
Xiaoge Su 3a9bf10d81 fixup! Try fix Windows build 2022-09-12 19:35:55 -07:00
Markus Pilman acd24d6c81 Merge remote-tracking branch 'origin/main' into features/always-inject-faults 2022-09-12 16:44:16 -06:00
Xiaoge Su 6b27f10a6c fixup! Fix windows compile 2022-09-12 14:44:38 -07: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
Xiaoxi Wang 806d0a8599 merge upstream/main; solve conflicts 2022-09-12 12:34:35 -07:00
Xiaoge Su 5996643f13 fixup! Fix the include file 2022-09-12 12:01:05 -07:00
Xiaoge Su 8130fce97f Update code per comments
Also sort #include in Platform.actor.cpp
2022-09-12 11:44:41 -07:00
Xiaoge Su 92eaf53da3 Reads and reports cpu.stat
Per #7952, content in /sys/fs/cgroup/cpu,cpuacct/cpu.stat is reported in
MachineMetrics.

If the file does not exist, reports `NoCpuStatFile`.

If the file is not parsable, reports `CpuStatFileParseError`.
2022-09-12 11:43:10 -07:00
Fuheng Zhao ee99de7cf3
Merge branch 'apple:main' into RedwoodIOLaunchLimit 2022-09-12 10:58:12 -07: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
He Liu ad11c6e82d Cleanup. 2022-09-06 19:00:09 -07: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
Fuheng Zhao 105c4e5236
Merge branch 'apple:main' into RedwoodIOLaunchLimit 2022-09-06 09:38:06 -07:00
Fuheng Zhao 91219a4a28 sync 2022-09-06 09:37:00 -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
He Liu 033741daab Audit should always complete, any failures are retried. 2022-09-02 09:11:19 -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
Fuheng Zhao c7f7544231 Merge remote-tracking branch 'upstream/main' into RedwoodIOLaunchLimit 2022-09-01 14:53:11 -07: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
Xiaoxi Wang b18561bc31 Merge branch 'main' of https://github.com/apple/foundationdb into feature/dd-refactor-simple 2022-09-01 09:29:30 -07:00
Fuheng Zhao 0aa096dc17 sync with upstream main 2022-08-31 15:46:39 -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
Xiaoxi Wang 04c8f28ecd Merge branch 'main' of https://github.com/apple/foundationdb into feature/dd-refactor-simple 2022-08-29 14:59:48 -07: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
Xiaoxi Wang 5c2b846fbd solve conflicts in upstream/main 2022-08-19 15:36:17 -07:00
He Liu 7cca369f66 Implemented validateRangeAgainstServer. 2022-08-17 16:51:41 -07: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
Junhyun Shim bcb9bc7e62 Set up authz integration test environment using Python venv
Add Authz-related support to {tmp|local}_cluster.py
Also fix public key set load/refresh mechanism
2022-08-17 14:57:05 +02:00
Mohamed Oulmahdi c8741385b2 Fix Windows build broken by #7823 2022-08-16 15:39:24 +02:00
Xiaoxi Wang c9f94264f0 merge upstream/main 2022-08-15 13:30:38 -07:00
Markus Pilman 18aa638951
Merge pull request #7877 from sfc-gh-mdvorsky/mdvorsky/fix_net2_unittest
Fix Net2 unittest flakiness
2022-08-15 13:58:40 -06:00
Fuheng Zhao 70ae255744 add Redwood PML metrics 2022-08-15 11:34:09 -07:00
Ata E Husain Bohra 03435b5133
Update BlobCipher cache to respect EKP/KMS cipherKey TTL (#7885)
Description

FDB native encryption data at-rest supports two type of cipher-keys
in-memory caching:
1. Revocable keys - with a definite expiry (future timestamp)
2. Non-revocable keys - with or without expiry timestamp and/or
refreshAt timestamp.

Patch update BlobCipherKey in-memory cache to respect EKP/KMS
supplied 'refreshAt' and 'expireAt' timestamp. GetLatestCipher
validates `cipher key freshness' as well as GetCipherKey checks
for 'cipher key liveness' before replying details to the caller.

Patch also optimizes the BlobCipher module logging by taking
following measures:
1. BLOB_CIPHER_DEBUG macro to guard spammy log messages needed
mostly for debugging failures.
2. Minimize log volume by logging cipherKey details for any new
key added to the cache, key-refreshes are not logged.
3. Categorize logs into: debug, info and warn on per-usecase basis

Testing

devRunCorrectness - 100K
EncryptOps.toml - 100K
2022-08-15 11:17:26 -07:00
Xiaoxi Wang 806821ef30 merge upstream/main 2022-08-15 10:46:38 -07:00
Marian Dvorsky 8e6009427e Fix Net2 unittest flakiness 2022-08-13 18:51:30 +02:00
Xiaoxi Wang 9133d4e16d
Merge pull request #7803 from sfc-gh-xwang/feature/main/ddvisibility
Add server selection counter in DDQueue
2022-08-12 15:10:25 -07:00
Jingyu Zhou aa29de8d4c
Merge pull request #7838 from xis19/proxyerror
Split the proxy_memory_limit_exceeded to commit/grv version
2022-08-12 10:16:06 -07:00
Junhyun Shim 3cf0914ce0 Fix incorrect parenthesis 2022-08-12 13:52:50 +02:00
Junhyun Shim 312d3da040 Merge remote-tracking branch 'origin/main' into fix-skewed-u32-out-of-range 2022-08-12 13:01:43 +02:00
Junhyun Shim e57d3a6f9b Address review comments 2022-08-12 10:24:23 +02:00
Xiaoge Su 0326d53965 Split proxy_memory_limit_exceeded to commit/grv specific exceptions
Currently GRV is reporting proxy_memory_limit_exceeded error which has
error message claiming Commit proxy failing. This split should remove
such confusion.
2022-08-12 00:45:57 -07:00
Josh Slocum 44f8bdd258
Blob Worker memory limit (#7858)
* Simulation version of blob_worker_full

* tracking blocked BM assignments

* actual memory estimation implementation
2022-08-11 15:07:08 -07:00
Trevor Clinkenbeard 583021c2d9
Merge pull request #7772 from sfc-gh-tclinkenbeard/global-tag-throttling6
Add status section for global tag throttler
2022-08-11 17:38:31 -03:00
A.J. Beamon a41f8d2354
Merge pull request #7768 from sfc-gh-ajbeamon/metacluster-api-changes
Metacluster metadata changes
2022-08-10 13:19:58 -07:00
Xiaoxi Wang 1cff154adb Merge branch 'main' of https://github.com/apple/foundationdb into feature/main/ddvisibility 2022-08-10 12:03:42 -07:00
Xiaoxi Wang ea0c60381f merge upstream/main 2022-08-09 12:28:57 -07:00
Arjun Sharda e89b077b97
Update ParseTree.cs 2022-08-09 14:27:48 -05:00
Arjun Sharda dfdfe3f9a1
Update Program.cs 2022-08-09 14:27:37 -05:00
Arjun Sharda 0dce3e5d91
Update ActorCompiler.cs 2022-08-09 14:27:15 -05:00
A.J. Beamon cd82f65ef5 Change the data cluster entry to use a state field rather than a locked boolean 2022-08-09 11:53:57 -07:00
Markus Pilman 69744ffdcb disable new failure injection 2022-08-08 14:39:21 -06:00
Markus Pilman 86ee76ec50
Merge pull request #7816 from sfc-gh-mdvorsky/mdvorsky/coverage
Flush gcov coverage upon SIGTERM
2022-08-08 12:03:22 -06:00
Markus Pilman c9865809e0
Merge pull request #7786 from sfc-gh-mdvorsky/mdvorsky/net2_unittest
Add Net2 unittests for ThreadSafeQueue and Net2::onMainThread
2022-08-08 11:23:31 -06:00
Marian Dvorsky e268ae9a86 Run clang-format 2022-08-08 18:48:15 +02:00
Marian Dvorsky b8370e5129 Print SIGNAL output to stdout 2022-08-08 18:28:11 +02:00
Marian Dvorsky 77269d0506 Print to stderr only upon errors 2022-08-08 18:11:35 +02:00
Vaidas Gasiunas 79571dd2b4
Testing upgrades to a future version of FDB (#7780)
* Enable configuring the next future protocol version as the current protocol version in FDB client, fdbserver, and fdbcli

* Auto format python files used in upgrade tests

* Add a test for upgrading to a future FDB version

* Emphasize that the options for using future protocol version are intended for test purposes only

* Make the global variable for current protocol version visible only locally

* Refactirng to avoid using currentProtocolVersion() in static intialization

* Update go bindings
2022-08-08 17:29:49 +02:00
Marian Dvorsky 722f66beb7 Flush gcov coverage upon SIGTERM 2022-08-08 17:11:20 +02:00
Xiaoxi Wang b18e29dd87 Merge remote-tracking branch 'upstream' into feature/main/ddvisibility 2022-08-06 21:43:36 -07:00
Xiaoxi Wang c199ea054c format code 2022-08-06 20:01:35 -07:00
Dan Lambright f9866f419a Propagate environment variables to spaned fdbserver process 2022-08-06 11:09:09 -07:00
Marian Dvorsky 671a2f9f8e Add comment to INetwork 2022-08-05 19:59:06 +02:00
Marian Dvorsky 6b790ef4b8 Disable the new onMainThread test in simulation 2022-08-05 17:06:34 +02:00
Marian Dvorsky 7c00c57253 Small fixes 2022-08-05 16:30:05 +02:00
sfc-gh-tclinkenbeard 7fe2088e09 Add ITagThrottler::getRates method 2022-08-04 16:58:58 -07:00
A.J. Beamon ff23d5994e
Merge pull request #7729 from sfc-gh-ajbeamon/feature-metacluster
Metacluster
2022-08-04 15:29:44 -07:00
Xiaoxi Wang 90b0d74875 DebugRelocationTraceEvent; TraceInterval randomId: 2022-08-04 15:28:33 -07:00
Fuheng Zhao d5c3679046 merge upstream main and resolve conflicts 2022-08-04 12:15:00 -07:00
Jingyu Zhou 84d483605b
Merge pull request #7431 from xis19/main
Let the storage server reports busiest write tag
2022-08-04 10:23:31 -07:00
Marian Dvorsky 9e4af40b0f Run clang-format 2022-08-04 16:20:42 +02:00
Marian Dvorsky 70748f51e4 Add Net2 unittests for ThreadSafeQueue and onMainThread 2022-08-04 16:03:59 +02:00
Xiaoxi Wang 07eafcec93
Merge pull request #7763 from sfc-gh-xwang/feature/main/unittest
move waitForMost into generic actors
2022-08-02 13:30:30 -07:00
Dan Lambright 4a25f8b692 Merge remote-tracking branch 'origin' into env 2022-08-02 14:51:50 -04:00
Dan Lambright 473feef246 Set knobs using environment variables 2022-08-02 14:29:37 -04:00
Xiaoxi Wang 3c76ad9e72 move waitForMost into generic actors 2022-08-02 10:38:11 -07:00
Josh Slocum 4b66645d80
Granule file performance benchmark and improvements (#7742)
* added cpu microbenchmark for blob granule files

* Added edge case read benchmarks, and sorting memory deltas

* Sorted merge for granule files

* key block comparison optimization in granule files

* More performance improvements to granule file read

* fixing zlib not supported build

* fixing formatting

* Added debug macro for new debugging prints

* review comments

* more strict compression size validation assert
2022-08-02 11:36:44 -05:00
Xiaoge Su 75b69d7774 fixup! gcc build error 2022-08-01 18:56:50 -07:00
Xiaoge Su ead1aa5bc1 fixup! Remove C++20 attribute 2022-08-01 18:56:50 -07:00
Xiaoge Su ec40c6bfec fixup! Add a wrapper of ResourceWeakRef for better support of self pointer 2022-08-01 18:56:50 -07:00
Xiaoge Su 2ce456bd3f fixup! Fix minor issues
* Reintroduce the anonymous namespace deleted by accident
 * Rename the guardian definition in OwningResource.h
2022-08-01 18:56:50 -07:00
Xiaoge Su bc9d2e8cbe fixup! Fix per upstream change 2022-08-01 18:56:50 -07:00
Xiaoge Su cf04afe925 fixup! Non-owning reference to an object
See documents in flow/OwningResource.h
2022-08-01 18:56:50 -07:00
Xiaoge Su 26877a8924 fixup! Remove the boost/bind.hpp in TLSTest.cpp
Not used, and causes gcc emit warning
2022-08-01 18:56:50 -07:00
A.J. Beamon 1b693a588a Merge branch 'main' into feature-metacluster 2022-08-01 14:43:14 -07:00
Renxuan Wang 51b92d59b9
Merge pull request #7733 from RenxuanW/hostname-backup
Prefer IPv6 in hostname resolving.
2022-08-01 12:34:02 -07:00
Renxuan Wang 4a0bea2230 Document for pickOneAddress(). 2022-08-01 10:54:04 -07:00
A.J. Beamon ad52c575a8 Merge branch 'main' into feature-metacluster 2022-07-30 18:33:19 -07:00
Xiaoxi Wang dd902fc772 create ShardsAffectedByTeamFailure.h 2022-07-29 15:12:15 -07:00
A.J. Beamon 8b7b6d1d4c Various cleanup; change some test parameters; add a test for metacluster management operations 2022-07-29 09:24:06 -07:00
Renxuan Wang 316ea60232 Prefer IPv6 in hostname resolving. 2022-07-28 20:07:16 -07:00
A.J. Beamon e8e4f3ad3a Merge branch 'main' into feature-metacluster
# Conflicts:
#	fdbclient/include/fdbclient/Tenant.h
2022-07-28 16:53:29 -07:00
A.J. Beamon 5db1135ac6 Add MetaclusterOperationContext to make it easier to run multi-transaction operations 2022-07-28 16:44:20 -07:00
A.J. Beamon 65cfc839a6 Some various cleanup 2022-07-28 13:35:24 -07:00
Markus Pilman ade9d20780
Merge pull request #7628 from sfc-gh-mpilman/features/code-coverage-test-harness
Change test harness to include comments
2022-07-28 13:54:21 -06:00
A.J. Beamon 7f53b340f5 Merge branch 'main' into feature-metacluster
# Conflicts:
#	bindings/python/tests/fdbcli_tests.py
#	fdbcli/TenantCommands.actor.cpp
#	fdbclient/ClientKnobs.cpp
#	fdbclient/include/fdbclient/ClientKnobs.h
#	fdbclient/include/fdbclient/Tenant.h
#	fdbserver/BlobManager.actor.cpp
#	fdbserver/BlobWorker.actor.cpp
#	fdbserver/TenantCache.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	fdbserver/workloads/TenantManagementWorkload.actor.cpp
#	flow/include/flow/error_definitions.h
2022-07-28 11:43:21 -07:00
Junhyun Shim 65b441bd1b Watch public key file at CLI-arg path
Argument name: authorization-public-key-file
2022-07-28 20:03:19 +02:00
Junhyun Shim 1dbb13a899 Accept non-mTLS clients as untrusted 2022-07-28 20:03:07 +02:00
Markus Pilman 5469e58562 Merge remote-tracking branch 'origin/main' into features/code-coverage-test-harness 2022-07-28 10:01:20 -06:00
Junhyun Shim 1e83d7e1ab Apply code review suggestions 2022-07-28 00:47:14 +02:00
Junhyun Shim c6342a6e5b
Merge branch 'main' into features/authz 2022-07-27 20:51:32 +02:00
Markus Pilman ef46f72d0c Merge remote-tracking branch 'origin/main' into features/code-coverage-test-harness 2022-07-27 10:41:18 -06:00
A.J. Beamon 7c6b3fb0b8 Merge branch 'main' into feature-metacluster 2022-07-27 08:55:10 -07:00
A.J. Beamon d39c0b773a Add a limit to the number of tenants that can be created in a cluster 2022-07-27 08:21:03 -07:00
A.J. Beamon dec6dbfbfb
Merge pull request #7549 from sfc-gh-ajbeamon/feature-tenant-groups
Add support for tenant groups
2022-07-27 07:56:27 -07:00
Junhyun Shim d5f7294bd2 Fix failing Mac/BoringSSL build 2022-07-27 01:05:56 +02:00
Junhyun Shim 5169616b16 Fix unresolved merge conflicts 2022-07-27 00:38:16 +02:00
Junhyun Shim e2a3fedfc7
Merge branch 'main' into features/authz 2022-07-27 00:08:57 +02:00
Josh Slocum 0609aa57d1 Merge branch 'main' into improved_cf_testing 2022-07-26 16:44:13 -05:00
Josh Slocum c32e1da908
Merge pull request #7673 from sfc-gh-jslocum/delta_files_v2
Sorted Delta Files
2022-07-26 16:04:55 -05:00
Xiaoxi Wang 7cf6037191 remove runAfter 2022-07-26 12:12:56 -07:00
Xiaoxi Wang 53d1e1abf3 create ShardsAffectedByTeamFailure files 2022-07-26 10:15:51 -07:00
A.J. Beamon a64693518a Add support for tenant groups 2022-07-26 09:04:29 -07:00
Renxuan Wang dc9599f2e9
Get network interfaces ready for https proxy. (#7556)
* Move HTTP from fdbclient/ to fdbrpc/.

* Move md5 and libb64 to contrib/.

* Get network interfaces ready for https proxy.

* Rebase
2022-07-25 17:08:32 -07:00
Fuheng Zhao f761f9a03a use DefaultEndPoint as the default priority for storage server reads 2022-07-25 10:10:42 -07:00
A.J. Beamon 077003c4f5 Cleanup tenant tombstones periodically 2022-07-24 18:24:19 -07:00
Junhyun Shim 742b73028c Fix incorrect range in randomSkewedUInt32()
Currently it invokes pow(10, uniform_rand(log_e(range_begin), log_e(range_end))),
which may overflow beyond UINT32_MAX.
Fix it by preventing log_e(0) case and change pow base to M_E
2022-07-24 23:02:48 +02:00
Andrew Noyes 83a317ef88
Disable guard pages for valgrind build. Closes #7610 (#7672) 2022-07-22 16:51:05 -07:00
A.J. Beamon 524c3131c5 Use a more specific error if we reject a tenant property change due to it needing to be moved 2022-07-22 15:43:51 -07:00
Josh Slocum ea9018460a cleanup and polish 2022-07-22 15:13:32 -05:00
A.J. Beamon 9b66e0c1c7 Fix some subtle differences between branches 2022-07-22 12:51:24 -07:00
A.J. Beamon b308aa6604 Merge branch 'feature-tenant-groups' into feature-metacluster 2022-07-22 11:38:23 -07:00
A.J. Beamon 237081905d Add support for tenant groups 2022-07-22 09:27:31 -07:00
A.J. Beamon 3e1763e7ac Merge branch 'main' into feature-metacluster 2022-07-21 14:48:53 -07:00
Xiaoxi Wang e1c4aa1bd5 Merge branch 'main' of https://github.com/apple/foundationdb into feature/dd-refactor-simple 2022-07-21 12:43:58 -07:00
Andrew Noyes 45c8a4e09d
Build fixes/improvements for sanitizers (#7657)
* Don't build fdb c shim with ubsan

This avoids duplicate symbols when linking. It doesn't really make sense
to assemble files with -fsanitize=undefined anyway, since it won't
insert instrumentation.

* Consolidate boost_asan with boost_target
2022-07-21 12:43:38 -07:00
Xiaoxi Wang 6eaf39c6cc change reference to pointer; default constructor enabled 2022-07-21 11:37:26 -07:00
Junhyun Shim 908b8faa88 Fix unmatched signatures for BoringSSL 2022-07-21 15:17:34 +02:00
Junhyun Shim 97880880cd Defer Simulation check in OSSL-IRandom binding until g_network is set 2022-07-21 14:52:02 +02:00
Junhyun Shim f76021fe7b Apply Clang format 2022-07-21 12:12:48 +02:00
Junhyun Shim e6fe4a62b4 Ensure DeterministicRandom gets used by OpenSSL exclusively in Simulation 2022-07-21 12:11:33 +02:00
A.J. Beamon 190711ccd8
Merge pull request #7622 from sfc-gh-ajbeamon/eat-and-connection-string-changes
Add some helper functions to ClusterConnectionString and an improvement to StringRef.eat
2022-07-20 16:10:24 -07:00
A.J. Beamon 4d036ae339
Merge pull request #7626 from sfc-gh-ajbeamon/tenant-metadata-change
Some changes to the tenant metadata
2022-07-20 14:50:00 -07:00
Ata E Husain Bohra 9a3e88df46
Fix ASAN build (#7629)
* Fix ASAN build

Description
  -diff-2: Fix Mac build issues
  -diff-1: Address review comments

Patch addresses the issue where ASAN build failed after introducing
BlobGranule compression.

Testing

ASAN build
2022-07-20 14:14:46 -07:00
A.J. Beamon 279296c29f Merge branch 'tenant-metadata-change' into feature-metacluster
# Conflicts:
#	fdbclient/SystemData.cpp
#	fdbclient/Tenant.cpp
#	fdbclient/include/fdbclient/SystemData.h
#	fdbclient/include/fdbclient/Tenant.h
#	fdbclient/include/fdbclient/TenantManagement.actor.h
#	fdbserver/TenantCache.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	fdbserver/workloads/TenantManagementWorkload.actor.cpp
2022-07-20 09:18:27 -07:00
Junhyun Shim b521dc2f58 Bind DeterministicRandom to OpenSSL RNG 2022-07-20 16:03:09 +02:00
Josh Slocum 5540f92e2e Refactoring randomExp to the proper place 2022-07-20 08:36:03 -05:00
Junhyun Shim 0874e553cd Place generateRandomData() under {I|Deterministic}Random 2022-07-20 13:21:11 +02:00
Markus Pilman 3327ab395b Change test harness to include comments 2022-07-19 15:41:53 -06:00
A.J. Beamon 537ceff8ac Remove the ability to configure a tenant subspace. Rename the prefixes used for tenant metadata. 2022-07-19 14:32:05 -07:00
Dan Adkins f144c929d3 Fix parsing of knob values to reject invalid values.
As of version 7.1, knob parsing started using std::stol which will
partially consume its input and return success, even if that's not
what we want, e.g. std::stol("4GiB") returns 4.

This changes returns the behavior of 7.0, which would consider the
above example invalid.
2022-07-19 16:46:42 -04:00
Markus Pilman 1de37afd52
Make TEST macros C++ only (#7558)
* proof of concept

* use code-probe instead of test

* code probe working on gcc

* code probe implemented

* renamed TestProbe to CodeProbe

* fixed refactoring typo

* support filtered output

* print probes at end of simulation

* fix missed probes print

* fix deduplication

* Fix refactoring issues

* revert bad refactor

* make sure file paths are relative

* fix more wrong refactor changes
2022-07-19 13:15:51 -07:00
A.J. Beamon 3ceb2a0639 Merge branch 'main' into feature-metacluster 2022-07-19 13:04:54 -07:00
A.J. Beamon 7324f28441 Add the ability for StringRef.eat to return whether a separator was found. Add a serialize function and equality operators to ClusterConnectionString. Remove unused variable. 2022-07-19 11:55:58 -07:00
Fuheng Zhao 2322730345 fix issues related to terminate storage server 2022-07-19 11:19:30 -07:00
Renxuan Wang 570db7a7d2
Fix processDiskReadSeconds and processDiskWriteSeconds. (#7608) 2022-07-18 13:47:45 -07:00
Renxuan Wang 78fecb76d9 Fix processDiskReadSeconds and processDiskWriteSeconds. 2022-07-18 11:25:12 -07:00
A.J. Beamon 8f77048e95 Add the ability to configure tenant groups in a metacluster 2022-07-18 11:24:49 -07:00
Junhyun Shim 8b70c7050d Apply RTLD_NODELETE for USE_SANITIZER builds
This allows their stack trace to be symbolized in CI/Jenkins XSAN runs
2022-07-18 19:25:12 +02:00
Andrew Noyes 989e323991
Attempt to fix windows build (#7600)
* Attempt to fix windows build

The windows build is complaining that some symbols in flow are
duplicate, which seems fair since we're currently compiling all the flow
sources and _also_ linking to flow for flowlinktest. This change makes
it so that we only link flow, and don't compile the flow source files
again.

* Remove source files from fdbclient and fdbrpc link tests
2022-07-18 08:59:03 -07:00
A.J. Beamon 860d3843cc Merge remote-tracking branch 'origin/feature-tenant-groups' into feature-metacluster 2022-07-16 19:33:26 -07:00
A.J. Beamon c08592368f Add support for tenant groups 2022-07-15 21:18:41 -07:00
Ata E Husain Bohra f6f117592d BlobFile Encryption and compression support
- Limit verbose logging under DEBUG_MACRO
 - Update/Add code documentation

Description

Testing
2022-07-14 17:04:14 -07:00
Ata E Husain Bohra 24b2de8de8 BlobFile Encryption and compression support
Description

Testing
2022-07-14 17:04:14 -07:00
Fuheng Zhao 312e160a12 use PriorityMultiLock in storage server 2022-07-14 15:29:54 -07:00
A.J. Beamon cb499fa5db Merge branch 'main' into feature-metacluster 2022-07-13 15:28:34 -07:00
Fuheng Zhao 0612f0f1b2 Merge branch 'main' of https://github.com/apple/foundationdb into RedwoodIOLaunchLimit 2022-07-12 10:17:41 -07:00
Markus Pilman 2edbcf2c65
Merge pull request #44 from apple/main
Merge main
2022-07-12 07:51:22 -06:00
Markus Pilman fa9e623fc1
Merge pull request #7459 from sfc-gh-ljoswiak/features/module-link-tests
Add test executables to catch missing symbols in modules
2022-07-11 17:31:11 -06:00
Fuheng Zhao 358b592458 Merge branch 'main' of https://github.com/apple/foundationdb into RedwoodIOLaunchLimit 2022-07-11 15:19:35 -07:00
Fuheng Zhao 0955419418 move ParsingStringVector function to genericactor class 2022-07-11 11:13:32 -07: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
He Liu bc5bfaffda
Shard based move (#6981)
* 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
A.J. Beamon 346d3c3265
Merge pull request #7487 from sfc-gh-ajbeamon/buggified-commit-helper
Add a helper to simulate a commit that can fail with unknown result or take a long time
2022-07-07 16:17:19 -07:00
Markus Pilman 56541167c2 send token with tenant info object 2022-07-06 20:58:17 -06:00
A.J. Beamon c9b553663e Merge branch 'main' into feature-metacluster
# Conflicts:
#	bindings/java/src/main/com/apple/foundationdb/TenantManagement.java
#	fdbcli/TenantCommands.actor.cpp
#	fdbclient/NativeAPI.actor.cpp
#	fdbclient/TenantSpecialKeys.actor.cpp
#	fdbclient/include/fdbclient/KeyBackedTypes.h
#	fdbclient/include/fdbclient/RunTransaction.actor.h
#	fdbclient/include/fdbclient/SpecialKeySpace.actor.h
#	fdbserver/workloads/TenantManagementWorkload.actor.cpp
2022-07-06 15:44:21 -07:00
Lukas Joswiak 618f8455c4 Add test executables to catch missing symbols
Currently, we have code in different folders like `flow/` and `fdbrpc/`
that should remain isolated. For example, `flow/` files should not
include functionality from any other modules. `fdbrpc/` files should
only be able to include functionality from itself and from `flow/`.
However, when creating a shared library, the linker doesn't complain
about undefined symbols -- this only happens when creating an
executable. Thus, for example, it is possible to forward declare an
`fdbclient` function in an `fdbrpc` file and then use it, and nothing
will break (when it should, because this is illegal).

This change adds dummy executables for a few modules (`flow`, `fdbrpc`,
`fdbclient`) that will cause a linker error if there are included
symbols which the linker can't resolve.
2022-07-06 14:49:33 -07:00
A.J. Beamon 8897a03913 Allow for random delays in buggifiedCommit that don't cause timeouts or that occur before we throw commit_unknown_result. Add a delay(0) to avoid a nowait buggifiedCommit in the typical case. 2022-07-06 12:48:13 -07:00
Junhyun Shim db449b80f7
Authz JWKS (#7519)
* 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
A.J. Beamon aea4d802c6 Merge branch 'main' into feature-metacluster 2022-06-30 15:08:09 -07:00
Yi Wu 364644673f
Support TLog encryption in commit proxy (#6942)
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
sfc-gh-tclinkenbeard 2134fa9a0c Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-28 19:51:41 -07:00
A.J. Beamon 55404d0cd8 Add a helper to simulate a commit that can fail with unknown result or take a long time 2022-06-28 16:41:57 -07:00
A.J. Beamon e1a93988ef Merge branch 'main' into feature-metacluster 2022-06-28 14:58:07 -07:00
Markus Pilman 9d16260822 Merge remote-tracking branch 'origin/main' into features/authz 2022-06-28 13:13:51 -06: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 20e7371036 some Linux fixes 2022-06-28 08:51:13 -06:00
Markus Pilman d31fb30f57 fdbclient compiling 2022-06-27 18:31:05 -06:00
Markus Pilman 88af6b403f fdbrpc compiling 2022-06-27 18:11:55 -06:00
Markus Pilman 03d913a1de Flow compiling 2022-06-27 17:05:55 -06:00
A.J. Beamon eccf244ba6 Add an index that allows us to allocate tenants from the non-full cluster with the most tenants already assigned to it. 2022-06-27 12:28:55 -07:00
Markus Pilman 3aaae9c521 Merge remote-tracking branch 'origin/main' into features/authz 2022-06-27 11:07:14 -06:00
Markus Pilman e35633149c
Merge pull request #7447 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 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