Commit Graph

5857 Commits

Author SHA1 Message Date
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
Trevor Clinkenbeard 7b4598a53d
Merge pull request #8197 from sfc-gh-jslocum/bg_code_coverage_cleanup
cleaning tss and blob granule file code probes
2022-09-16 09:32:20 -07:00
sfc-gh-ngoyal 1bd97fe628
Recruit new singleton for consistency checker. (#5804)
* Recruit new singleton for consistency checker.

* Recruit the consistency checker only if enabled.

* Add a yield in monitorConsistencyChecker().

* Minor fixes.

* Consistency check workload enhancements.

* Minor fixes and clarifications.

* clang format

* Clang format.

* Minor fixes, cleanup, debug tracing.

* Misc.

* Move the consistency scan information from dbconfig to a key backed object.

* Move consistency scan config out of db cofig to a state object and feature rename.

* ConsistencyCheck workload refactor.

* devFormat

* Update fdbcli/ConsistencyScanCommand.actor.cpp

* Review Comments.

Co-authored-by: negoyal <neelam.goyal@gmail.com>
Co-authored-by: Ata E Husain Bohra <ata.husain@snowflake.com>
2022-09-16 09:03:06 -07:00
Josh Slocum 4ead9a697f cleaning tss and blob granule file code probes 2022-09-16 09:51:33 -05:00
Josh Slocum 17c855be7e
Merge pull request #8196 from sfc-gh-jslocum/cf_metrics_fix
not counting end of stream as an error for change feeds
2022-09-16 09:05:25 -05:00
Josh Slocum 977c03ff78 not counting end of stream as an error for change feeds 2022-09-15 17:37:52 -05:00
Fuheng Zhao ac65c3f569 merge upstream main 2022-09-15 14:19:19 -07:00
Jingyu Zhou a4f9ef8aaa Make a new memory arena for Tuple::clear
To avoid potential problem of invalidating contents of previously returned from
pack() calls.
2022-09-15 12:49:11 -07:00
Hui Liu b19f1b5e3b
Merge pull request #8109 from sfc-gh-huliu/bmr
Add blob manifest for full restore
2022-09-15 11:05:41 -07:00
Jon Fu 7b0285a205 attempt to pass sim tests and api tests 2022-09-15 11:02:28 -07:00
Trevor Clinkenbeard 0ae5321b52
Merge pull request #8186 from sfc-gh-tclinkenbeard/make-gsimulator-ptr
Make `g_simulator` a pointer
2022-09-15 10:29:22 -07:00
Hui Liu 59be25848f bootstrap blob manager and blob worker from blob manifest 2022-09-15 09:50:12 -07:00
Trevor Clinkenbeard 6c211be57c
Merge pull request #8182 from sfc-gh-nwijetunga/nim/remove-code-probes
Remove FileBackupAgent Code Probes
2022-09-15 09:07:47 -07:00
sfc-gh-tclinkenbeard 82adc1e856 Make g_simulator a pointer 2022-09-15 09:00:33 -07:00
Lukas Joswiak 54a12483e4 Add build date and time to build_flags
Also fixes the Boost lib version.
2022-09-14 15:11:51 -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
Jon Fu a7956f42a4 add version guard and add network option to testConfig 2022-09-14 13:15:24 -07:00
Jon Fu 51b9861354 check data cluster entry for capacity and account for different thrown errors 2022-09-14 12:57:46 -07:00
Andrew Noyes 0afa24bb3f
Fix undefined behavior when retries is too large (#8180)
fdbclient/PaxosConfigTransaction.actor.cpp:221:77: runtime error: shift exponent 32 is too large for 32-bit type 'int'

I confirmed that 1 << 30 is not UB
2022-09-14 11:46:15 -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
Nim Wijetunga 91fb7c72c8 remove code probes 2022-09-14 10:40:35 -07:00
Jon Fu e3f54dba2f throw invalid_tenant_configuration and add to metacluster management test 2022-09-14 10:22:51 -07:00
Jingyu Zhou e70a18e638
Merge pull request #8122 from xumengpanda/mengxu/io-timeout-main
Add STORAGE_SERVER_REBOOT_ON_IO_TIMEOUT knob to reboot SS on io_timeout
2022-09-14 10:11:46 -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
Josh Slocum e5eabbf3df Additional observability for change feeds 2022-09-14 09:55:15 -05:00
Meng Xu 9e9efb69a0 Format code to repo style 2022-09-13 16:59:45 -07:00
Lukas Joswiak 8c50f98c00 Update type of coordinators hash
This fixes some serialization issues due to `BinaryReader` not being
able to deserialize types of size_t.
2022-09-13 16:53:54 -07:00
Lukas Joswiak 424bb87f3e Apply feedback 2022-09-13 16:53:54 -07:00
Lukas Joswiak 09892df0b0 Remove unused knob 2022-09-13 16:53:54 -07:00
Lukas Joswiak 7ee6be9238 Simplify how ConfigBroadcastInterface is stored on worker 2022-09-13 16:53:54 -07:00
Lukas Joswiak 2fe3fc5379 Fix issue with pointer dereference after actor cancellation 2022-09-13 16:53:54 -07:00
Lukas Joswiak b2d395a304 Delay cluster controller restart when pushing knob updates to workers
This gives the `ConfigBroadcaster` time to send the knob change to all
workers before applying the change to itself and restarting.
2022-09-13 16:53:54 -07:00
Lukas Joswiak 8d237ba493 Fix various correctness and timeout issues
Contains the following fixes:

* When handling the special case rollforward where nodes can be rolled
  forward even if a majority are at version 0, we don't want to reset
  the live version of the node being rolled forward. This is because a
  quorum of nodes at version 0 can continue handing out and incrementing
  their live version, and if they are rolled forward there is the
  potential for them to go back in time in regard to their live version.
  So in this one special case, they should maintain their existing live
  version.
* Fixes some unseed issues due to fields not being initialized properly.
* Temporarily disables a coordinator restart in the recovery path (in
  the coordinated state) due to it causing a timeout. This needs more
  investigation in the future.
2022-09-13 16:53:54 -07:00
Lukas Joswiak 249ff2b2fd Fix configuration database unit tests 2022-09-13 16:53:54 -07:00
Lukas Joswiak 1a33515934 Add `--no-config-db` option to fdbcli coordinators command
Specifying the `--no-config-db` option when changing coordinators
through fdbcli will prevent the command from hanging when the
configuration database is not active. Failing to specify this option
when the configuration database is not active will not affect the
correctness of the command, but it will hang instead of returning.
2022-09-13 16:53:54 -07:00
Lukas Joswiak 74ac617a34 Add support for changing coordinators to the configuration database
Configuration database data lives on the coordinators. When a change
coordinators command is issued, the data must be sent to the new
coordinators to keep the database consistent.
2022-09-13 16:53:54 -07:00
sfc-gh-tclinkenbeard 2bea5b88bf Add /Atomic/DoAppendIfFits unit test 2022-09-13 11:35:39 -07:00
A.J. Beamon 87ee0a2963
Merge pull request #8160 from sfc-gh-ajbeamon/remove-unnecessary-option
Remove unnecessary special key-space relaxed option in binding tenant management
2022-09-12 17:06:04 -07:00
A.J. Beamon 0c91336461 Remove unnecessary special key-space relaxed option in binding tenant management 2022-09-12 14:30:28 -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
Trevor Clinkenbeard 1582e79cc2
Merge pull request #8153 from sfc-gh-tclinkenbeard/remove-hostname-resolution-codeprobe
Remove code probe for "Coordinator hostname resolving failure"
2022-09-12 14:01:52 -07:00
Fuheng Zhao ee99de7cf3
Merge branch 'apple:main' into RedwoodIOLaunchLimit 2022-09-12 10:58:12 -07:00
sfc-gh-tclinkenbeard 7a2554c73e Remove code probe for \"Coordinator hostname resolving failure\"
This is not intended to be hit in simulation, and we have visibility
into these events with the MonitorProxiesConnectFailed trace event.
2022-09-12 10:09:08 -07:00
Jingyu Zhou 9429ca992c
Merge pull request #8066 from sfc-gh-tclinkenbeard/fix-includes
Use full header file paths in includes
2022-09-12 09:43:24 -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
Vaidas Gasiunas 81fff640bd
Testing with invalid cluster files, fixing update from changed cluster file (#8126)
* ApiTester: test with invalid cluster files

* More asserts in monitorProxies

* ApiTester: Test tampering the cluster file

* Fix update of connection string from the cluster file to use the new connection string only if it valid

* ApiTester: add linker dependency on std++fs

* upgrade_test: no-cleanup-on-error option

* ApiTester: use atomic operations to change and access the transaction handle
2022-09-10 09:23:00 +02: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 6546e3c458
Merge pull request #8138 from sears/header_macro_cleanup
Fix duplicate (and broken) header macro FDBCLIENT_EVENTTYPES[S]_ACTOR…
2022-09-09 16:31:16 -07:00
Jon Fu 64a06f6c6b fix createtenantimpl constructor and make assignedcluster invalid for non-metacluster 2022-09-09 15:14:29 -07:00
Jon Fu 96f2ce0e43 initial commit to support specifying assignedCluster when creating a tenant 2022-09-09 15:03:59 -07:00
Jon Fu 0f78f748f9 add assertion 2022-09-09 15:01:26 -07:00
Jon Fu f6d6aa719f initial commit to introduce network option for disabling mvc bypass 2022-09-09 14:29:38 -07:00
Jon Fu e205147104
Merge pull request #7993 from sfc-gh-jfu/jfu-tenant-special-key-space
Explicit tenant support in special key space
2022-09-09 13:33:43 -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
Jon Fu 006fc9a0ef code formatting 2022-09-09 11:58:36 -07:00
Dennis Zhou 802893d02b FutureBool: fix bool -> fdb_bool_t
Honestly, this might not be an issue, but it's nice to be consistent
with the conversions across c++ -> c for bool type.
2022-09-09 11:29:52 -07:00
Dennis Zhou 28ac29476a blob: fix unblobbify calling blobbify 2022-09-09 11:29:52 -07:00
Jon Fu 75a096a5e5 Merge branch 'main' of github.com:apple/foundationdb into jfu-tenant-special-key-space 2022-09-09 10:12:19 -07:00
Josh Slocum e66015cbe4
Including change feed bytes towards storage queue (#8107) 2022-09-08 16:37:44 -07:00
Fuheng Zhao f64f245269 update storage server PML parameters 2022-09-08 10:49:18 -07: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
Vaidas Gasiunas b6fb1034a9
Fix crashes on database create errors (#8115)
* ApiTester: enable access to database instances in workloads

* ApiTester: Inject database create errors

* Fix getClusterProtocol and database shared object initialization in case of database create errors

* Check deferred error in all Thread-Safe API calls returning a future

* ApiTester: disable injection of database create errors for tests with old versions
2022-09-08 09:21:51 +02:00
Xiaoxi Wang e836b743c0 Merge branch 'main' of https://github.com/apple/foundationdb into fix/main/grvError 2022-09-07 20:50:03 -07:00
Dennis Zhou 7fc4a92d09
Merge pull request #8089 from sfc-gh-jslocum/unblobbify_idempotent
Blob range idempotency test and fixes
2022-09-07 17:31:05 -07:00
Meng Xu 358a0dd88d Add STORAGE_SERVER_REBOOT_ON_IO_TIMEOUT knob to reboot SS on io_timeout 2022-09-07 15:30:04 -07:00
Jon Fu da7ce5231c Merge branch 'main' of github.com:apple/foundationdb into jfu-tenant-special-key-space 2022-09-07 13:30:08 -07:00
Jon Fu 255795eac0 update test workload and reserve space for vector copies 2022-09-07 13:25:38 -07:00
Xiaoxi Wang 9fe12a256b catch grv_proxy_memory_limit_exceeded in getConsistentReadVersion 2022-09-06 22:18:14 -07:00
Jon Fu dbb6357371 add conflict range tests and change tenant prefix code to work with RYW 2022-09-06 16:55:57 -07:00
Dennis Zhou d9e7fc1245 ApiVersion: fix TraceFile apiversion check 2022-09-06 12:02:50 -07:00
Xiaoxi Wang fda4d6c8ea
Merge pull request #8099 from sfc-gh-xwang/fix/main/spancontextInit
Fixed Valgrind "uninitialised byte(s)" failure by initializing all member in Span
2022-09-06 10:46:08 -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
Vaidas Gasiunas 599e57b5f2
Use distinct base trace file names for client threads (#7922)
* Save thread indexes for client instances in MVC

* An option to inlude client thread identifiers into trace file names

* Avoid using new trace file options in client versions not supporting them

* Remove redundant include generated by IDE

* Use different base trace file names for client threads by default. Provide an option to revert to using a shared base file name

* Fixing typos in the description of trace_share_among_client_threads
2022-09-06 18:46:42 +02: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
Vaidas Gasiunas 8ca8691837 ApiVersion: Minor clean ups 2022-09-05 10:42:42 +02:00
Trevor Clinkenbeard 3ce737b2fa
Merge pull request #8086 from sfc-gh-tclinkenbeard/mark-promisestream-send-nonconst
Mark `PromiseStream::send` non-const
2022-09-04 14:55:47 -07:00
Xiaoxi Wang 9461450081 initialize all members in Span 2022-09-03 15:52:36 -07:00
Ata E Husain Bohra 28e608e717
Encryption data at-rest db-config (#7929)
* Encryption data at-rest db-config

Description

 diff-1: Handle 'force' updates to encryption_at_rest db-config

Major changes proposed:
1. Introduce 'encryption_data_at_rest_mode" 'configure new'
option to enable Encryption data at-rest. The feature is disabled
by default.
2. The configuration is meant to be set at the time of database
creation, addition checks will be done to avoid updating the config
in subsequent PR.
3. DatabaseConfiguration validity check to account for "tenant_mode"
set to `required` if Encryption data at-rest is selected given
EncryptionDomain matches Tenant boundaries.

Testing

devCorrectness - 100K
2022-09-02 14:11:38 -07:00
Josh Slocum 94e0c83214 Blob range idempotency test and fixes 2022-09-02 15:53:06 -05:00
sfc-gh-tclinkenbeard 3dec9749d3 Mark PromiseStream::send non-const 2022-09-02 10:41:56 -07:00
He Liu 0bbce98da2
Disable shard aware (#8072)
* Removed STORAGE_SERVER_SHARD_AWARE knob.

* Fixed PhysicalShardMove test.

Co-authored-by: He Liu <heliu@apple.com>
2022-09-02 09:07:34 -07:00
Josh Slocum 2251ae0fc2
Added summarize blob granules c api and tests (#8076)
* Added summarize blob granules c api and tests

* addressing review comments

* format
2022-09-02 17:08:51 +02: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
Josh Slocum 58abda7d15
Merge pull request #8074 from sfc-gh-jslocum/fix_stream_maybe_delivered
Handling request_maybe_delivered in reply promise stream and injecting faults to make sure the code path is exercised
2022-09-01 14:16:57 -05:00
Fuheng Zhao 61233123b2 format 2022-09-01 11:26:32 -07:00
Josh Slocum 663b1b9711 Handling request_maybe_delivered in reply promise stream and injecting faults to make sure the code path is exercised 2022-09-01 12:57:09 -05:00
Nim Wijetunga 72ccc681be move tenant entry cache to client 2022-09-01 10:10:47 -07:00
Fuheng Zhao fe5f1fab19 sync 2022-08-31 16:11:21 -07:00
Fuheng Zhao 0aa096dc17 sync with upstream main 2022-08-31 15:46:39 -07:00
sfc-gh-tclinkenbeard b10a2a58f7 Use full paths in includes 2022-08-31 14:39:14 -07:00
Josh Slocum e7a82c9283
Merge pull request #8059 from sfc-gh-jslocum/bw_rk_fix
Adding knob and increasing delay for simulation ratekeeper throttling assert
2022-08-31 15:55:05 -05:00
Josh Slocum dcfc03a247
Merge pull request #8061 from sfc-gh-jslocum/ss_ebrake_speed_up_sim
Minimizing effect of overly small buggified ss ebrake limits when speed up simulation is set
2022-08-31 15:54:41 -05:00
Jon Fu 4733e5a096 add extra test cases for set/clear/commit 2022-08-31 12:49:42 -07:00
Yi Wu 49503987cc
Support Redwood encryption (#7376)
A new knob `ENABLE_STORAGE_SERVER_ENCRYPTION` is added, which despite its name, currently only Redwood supports it. The knob is mean to be only used in tests to test encryption in individual components, and otherwise enabling encryption should be done through the general `ENABLE_ENCRYPTION` knob.

Under the hood, a new `Encryption` encoding type is added to `IPager`, which use AES-256 to encrypt a page. With this encoding, `BlobCipherEncryptHeader` is inserted into page header for encryption metadata. Moreover, since we compute and store an SHA-256 auth token with the encryption header, we rely on it to checksum the data (and the encryption header), and skip the standard xxhash checksum.

`EncryptionKeyProvider` implements the `IEncryptionKeyProvider` interface to provide encryption keys, which utilizes the existing `getLatestEncryptCipherKey` and `getEncryptCipherKey` actors to fetch encryption keys from either local cache or EKP server. If multi-tenancy is used, for writing a new page, `EncryptionKeyProvider` checks if a page contain only data for a single tenant, if so, fetches tenant specific encryption key; otherwise system encryption key is used. The tenant check is done by extracting tenant id from page bound key prefixes. `EncryptionKeyProvider` also holds a reference of the `tenantPrefixIndex` map maintained by storage server, which is used to check if a tenant do exists, and getting the tenant name in order to get the encryption key.
2022-08-31 12:19:55 -07:00
Josh Slocum c587135988 Minimizing effect of overly small buggified ss ebrake limits when speed up simulation is set 2022-08-31 13:39:50 -05:00
Josh Slocum 3fcffd899f Merge branch 'main' into bw_rk_fix 2022-08-31 13:05:43 -05:00
Dennis Zhou 046141b5be blob: only allow unblobbification on aligned to ranges
If unblobbify request comes in, reject it if the start and end do not
align to a blob granule boundary.
2022-08-31 09:23:33 -07:00
Dennis Zhou dc27c9bbd7 blob: add basic pagination to listBlobbifiedRanges() 2022-08-31 09:23:33 -07:00
Dennis Zhou 5b6a1f0675 KeyRangeMap: introduce Unaligned KeyRangMap functions
This allows us to return:
[firstKey, transition points, endKey]
where firstKey <= keys.begin and endKey >= keys.end.

This also fixes a prior issue where we were ending the range with a
larger key's value rather than carrying the largest value within the
range to the end.
2022-08-31 09:23:33 -07:00
Dennis Zhou 65112fbdc0 RYW: fix limits.minRows
limits are being modified inplace for subsequent requests. However,
the updated minRows is being checked against the total result instead of
the original minRows.
2022-08-31 09:23:33 -07:00
Dennis Zhou 15c7331259 blob: fix blobRangeInactive = StringRef() 2022-08-31 09:23:33 -07:00
Josh Slocum 9721de70b6 Adding knob and increasing delay for simulation ratekeeper throttling assert 2022-08-31 09:08:27 -05:00
Yao Xiao ac7a5823e2
Add knob for CF write buffer size. (#8038) 2022-08-30 17:52:29 -07:00
Steve Atherton 557efa1b53
Merge pull request #7406 from sfc-gh-fzhao/RedwoodDataMovementNonCacheRead
Redwood add non-cache reads options
2022-08-30 17:25:05 -07:00
Andrew Noyes 51ddddc8bb
Fully qualify std::nullptr_t (#8044)
This happens to compile for some reason with libc++, but we don't open
the std namespace so we should fully qualify it.
2022-08-30 13:39:31 -07:00
Fuheng Zhao 620c119e9a update storage server priorities 2022-08-30 12:07:45 -07:00
Josh Slocum 269d54b7ad
One additional case for new error, and dropping retry limit for upgrade test back down (#8041) 2022-08-30 11:01:18 -05:00
Josh Slocum d90cdcc498
Adding new retryable error type for blob granule requests (#8023) 2022-08-30 15:07:10 +02:00
Josh Slocum 825a58880e
Reworked multi-version client readBlobGranules to not get stuck on client version changes (#8017)
* Reworked multi-version client readBlobGranules to not get stuck on version changes

* Addressing review comments
2022-08-30 09:16:09 +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
Hui Liu 756e33e7fe
Merge pull request #8025 from sfc-gh-huliu/fix
fix unit test isRangeCoveredByBlob
2022-08-29 15:22:08 -07:00
Josh Slocum 5f9d8e94af
Adding future_version reply to change feed operations for behind ss (#8000) 2022-08-29 17:20:23 -05:00
Hui Liu 45213175d0 fix unit test isRangeCoveredByBlob 2022-08-29 13:39:36 -07:00
Jon Fu 479d774e79 set raw access for certain management API functions and update special key test 2022-08-29 11:45:56 -07:00
Yao Xiao 09f62acd14
Add delay to physical shard clean up. (#7989) 2022-08-29 11:30:50 -07:00
Sreenath Bodagala f257b6c2d0
- Consider logging a trace event in "DatabaseContext::getLatestCommitVersions" (#8008)
only if the version vector doesn't have an entry for a tag.
- Address a bug in "run_custom_cluster.sh" (Note: code change provided
by Dan).
2022-08-29 09:22:34 -07:00
A.J. Beamon 2907d2d4dd
Merge pull request #8004 from sfc-gh-ajbeamon/fix-ub
Fix some undefined bevavior in RK and a unit test
2022-08-29 09:16:11 -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
Hui Liu 945dd371c1
Merge pull request #7965 from sfc-gh-huliu/check
check if fetchKeys is covered by blob storage
2022-08-26 15:52:19 -07:00
Evan Tschannen 8314e80371
Fixed a few bugs which caused ratekeeper to unnecessarily throttle a cluster (#8006)
* do not count recently created change feeds for throttling

* fix: blocked assignments were not decremented when force purging

* fix: created needs to be updated when the changefeed is reset

* added asserts to detect if ratekeeper is throttled on blob workers
2022-08-26 15:38:31 -07:00
Hui Liu b7d4453da7 check if fetchKeys is covered by blob storage 2022-08-26 14:21:44 -07:00
A.J. Beamon 0e782412a8 Fix some undefined bevavior: 1) a unit test was not initializing members of the WorkloadContext it was using, and 2) very large ratekeeper limits for batch priority were overflowing the types used to log them 2022-08-26 14:17:01 -07:00
Josh Slocum 46b02cab49
Blob granule summary implementation (in native client) (#7981)
* implemented blob granule summary call in native client

* clean up prints
2022-08-26 14:04:59 -05:00
Jingyu Zhou 37a367b965
Merge pull request #7698 from RenxuanW/main
Complete the proxy support for backup to S3.
2022-08-26 10:32:22 -07: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
Fuheng Zhao 4df9d1fc32 debugID field moved to option 2022-08-25 18:18:47 -07:00
Fuheng Zhao 75624a7f55
Update fdbclient/include/fdbclient/FDBTypes.h
Co-authored-by: Steve Atherton <steve.atherton@snowflake.com>
2022-08-25 17:25:42 -07:00
Jon Fu 337a2f8130 try to account for errors in fuzzapicorrectness and add test case in special key test 2022-08-25 15:28:06 -07:00
Jon Fu ee707b8f87 initial commit for explicit tenant support in special key space 2022-08-25 12:44:10 -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
Ata E Husain Bohra d6b1ac056c
KMS connector to assist encryption enabled perf runs (#7978)
Description

FDB Native encryption requires integration with external
KeyMangement Services to fetch required encryption keys.
For simulation runs, there exists SimKmsConnector implementation
that fakes interaction with external KMS.

Major changes suggested in the patch:
1. Enable setting KMS_CONNECTOR_TYPE via command line arguments.
2. If "FDBPerfKmsConnector" is set as KMS_CONNECTOR_TYPE, then
allow using SimKmsConnector implementation.

Note: SimKmsConnector can handle process reboots.

Testing

devRunCorrectness - 100K
2022-08-25 10:00:46 -07:00
Josh Slocum a27ee0f18a
Fixing UBSAN issues in BlobGranuleFiles (#7987) 2022-08-25 10:25:50 +02:00
Fuheng Zhao e3c46ffeef change FDB_DEFINE_BOOLEAN_PARAM 2022-08-24 15:53:05 -07:00
Fuheng Zhao 7c6dbaf3cf update trState ReadOption to optional 2022-08-24 15:04:17 -07:00
Josh Slocum e04e3885b9
Adding BlobRange test (#7868)
* Adding BlobRange test

* refactored blobrange test to use new db functions, and fixed several bugs

* bug fixes for blob manager and verifyBlobRange

* More range unaligned fixes

* cleaning up test and disabling tests that don't work yet for now

* removing overzealous assert in blob manager

* more fixes for overzealous assert

* cleanup and renaming test

* adding chaos to blob ranges test
2022-08-24 11:30:37 -05:00
Jon Fu 9eb313cb4b
Merge pull request #7791 from sfc-gh-jfu/jfu-metacluster-rename
Support tenant renaming in metacluster
2022-08-24 08:51:54 -07:00
Nim Wijetunga 827363fb06
Merge pull request #7980 from sfc-gh-nwijetunga/nim/move-ekp-client
Move EKP Interface and GetEncryptCipherKey to fdbclient
2022-08-24 08:04:09 -07: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
Nim Wijetunga a21d6d06a4 format 2022-08-23 23:36:18 -07:00
Nim Wijetunga cc25d893e9 change ifndef 2022-08-23 23:14:16 -07:00
Nim Wijetunga a857609478 refactor ekp interface 2022-08-23 23:04:12 -07:00
Fuheng Zhao 4e748d6bed use optional ReadOptions and RangeReadOptions in requests 2022-08-23 17:16:47 -07:00
Jon Fu 6ea49bd0df Merge branch 'main' of github.com:apple/foundationdb into jfu-metacluster-rename 2022-08-23 15:53:37 -07:00
Jon Fu a958ddb58a add tombstones on rename and fix several concurrency bugs with renames in progress 2022-08-23 15:50:58 -07:00
Josh Slocum cfc5ab550e
Update BlobGranules API tests (#7947)
* blob granule fixes from api tests

* Adding BlobGranuleErrors workload

* bug fixes and debugging improvements for blob granule api tests

* cleanup and refactoring of bg api tests

* better memory management for loadAndMaterialize
2022-08-23 17:47:02 -05:00