Commit Graph

316 Commits

Author SHA1 Message Date
Yao Xiao fcfe6a8c29 Fix metrics and add knobs 2022-08-11 11:46:21 -07:00
Josh Slocum 62494f048c
several changes to manage blob worker memory more and to test that management (#7834) 2022-08-09 17:53:52 -05:00
Jingyu Zhou eba77d78f4 Add knobs for min/max Ratekeeper limit
The default has no effects.
2022-08-08 15:27:21 -07:00
Xiaoxi Wang 8ecee1992b
Merge pull request #7777 from sfc-gh-xwang/feature/main/eligible-wiggle
Make storage wiggler support SS_MIN_AGE
2022-08-06 17:01:46 -07:00
Josh Slocum b2835921ba
Using knownBlobRanges for blob granule ranges whether tenants are enabled or not (#7788)
* Using knownBlobRanges for blob granule ranges whether tenants are enabled or not

* Effectively disabled blob granule tests when tenants enabled to fix ctest
2022-08-05 11:46:09 -05:00
Xiaoxi Wang 4b3acf6b4d update SS_MIN_AGE=21 day 2022-08-03 17:18:15 -07:00
He Liu fa418fd784
Change SHARD_ENCODE_LOCATION_METADATA to a server knob. (#7770)
Co-authored-by: He Liu <heliu@apple.com>
2022-08-03 13:51:40 -07:00
Xiaoxi Wang 2cd15073d5 make storage wiggler support SS_MIN_AGE 2022-08-02 16:21:41 -07:00
Trevor Clinkenbeard edf4e60fa9
Merge pull request #7631 from sfc-gh-tclinkenbeard/global-tag-throttling5
Improvements to `GlobalTagThrottler`
2022-08-02 16:04:20 -07:00
Dennis Zhou b34a54fa7f
blob: allow for alignment of granules to tuple boundaries (#7746)
* blob: read TenantMap during recovery

Future functionality in the blob subsystem will rely on the tenant data
being loaded. This fixes this issue by loading the tenant data before
completing recovery such that continued actions on existing blob
granules will have access to the tenant data.

Example scenario with failover, splits are restarted before loading the
tenant data:
BM - BlobManager
epoch 3:                        epoch 4:
  BM record intent to split.
  Epoch fails.
                                BM recovery begins.
  BM fails to persist split.
                                BM recovery finishes.
                                BM.checkBlobWorkerList()
                                  maybeSplitRange().
                                BM.monitorClientRanges().
                                  loads tenant data.

bin/fdbserver -r simulation -f tests/slow/BlobGranuleCorrectness.toml \
    -s 223570924 -b on  --crash --trace_format json

* blob: add tuple key truncation for blob granule alignment

FDB has a backup system available using the blob manager and blob
granule subsystem. If we want to audit the data in the blobs, it's a lot
easier if we can align them to something meaningful.

When a blob granule is being split, we ask the storage metrics system
for split points as it holds approximate data distribution metrics.
These keys are then processed to determine if they are a tuple and
should be truncated according to the new knob,
BG_KEY_TUPLE_TRUNCATE_OFFSET.

Here we keep all aligned keys together in the same granule even if it is
larger than the allowed granule size. The following commit will address
this by adding merge boundaries.

* blob: minor clean ups in merging code

1. Rename mergeNow -> seen. This is more inline with clocksweep naming
   and removes the confusion between mergeNow and canMergeNow.
2. Make clearMergeCandidate() reset to MergeCandidateCannotMerge to make
   a clear distinction what we're accomplishing.
3. Rename canMergeNow() -> mergeEligble().

* blob: add explicit (hard) boundaries

Blob ranges can be specified either through explicit ranges or at the
tenant level. Right now this is managed implicitly. This commit aims to
make it a little more explicit.

Blobification begins in monitorClientRanges() which parses either the
explicit blob ranges or the tenant map. As we do this and add new
ranges, let's explicitly track what is a hard boundary and what isn't.

When blob merging occurs, we respect this boundary. When a hard boundary
is encountered, we submit the found eligible ranges and start looking
for a new range beginning with this hard boundary.

* blob: create BlobGranuleSplitPoints struct

This is a setup for the following commit. Our goal here is to provide a
structure for split points to be passed around. The need is for us to be
able to carry uncommitted state until it is committed and we can apply
these mutations to the in-memory data structures.

* blob: implement soft boundaries

An earlier commit establishes the need to create data boundaries within
a tenant. The reality is we may encounter a set of keys that degnerate
to the same key prefix. We'll need to be able to split those across
granules, but we want to ensure we merge the split granules together
before merging with other granules.

This adds to the BlobGranuleSplitPoints state of new
BlobGranuleMergeBoundary items. BlobGranuleMergeBoundary contains state
saying if it is a left or right boundary. This information is used to,
like hard boundaries, force merging of like granules first.

We read the BlobGranuleMergeBoundary map into memory at recovery.
2022-08-02 16:06:25 -05: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
Josh Slocum 4d2f90977d
Merge pull request #7656 from sfc-gh-jslocum/cf_bw_operational_fixes
Cf bw operational fixes
2022-07-26 16:24:26 -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
Josh Slocum 15e7a4b186 addressing review comments 2022-07-26 14:20:35 -05:00
Josh Slocum ea9018460a cleanup and polish 2022-07-22 15:13:32 -05:00
Lukas Joswiak 703aa1d279 Mess with timeout values 2022-07-22 10:37:29 -07:00
Lukas Joswiak 40d403ed5f Reduce global configuration system key reads from proxy
Clients now poll the proxy for the latest global config for a specific
version. The proxy now periodically requests the latest global
configuration data and stores it in memory, enabling it to respond
immediately to clients with the appropriate version.
2022-07-22 10:37:29 -07:00
Lukas Joswiak 56dfdbda83 Add migration timeout 2022-07-22 10:37:29 -07:00
Lukas Joswiak 2e99d5f6cc Batch global config refresh requests 2022-07-22 10:37:29 -07:00
He Liu 7a8be255cd
Ss shard management (#7340)
* Storage server shard management with physical shards.

* Cleanup.

* Resolved comments.

* Added `UnlimintedCommitBytes`.

Co-authored-by: He Liu <heliu@apple.com>
2022-07-22 09:30:44 -07:00
Josh Slocum 0b674bf0c4 Merge branch 'main' into cf_bw_operational_fixes 2022-07-20 08:03:59 -05:00
Josh Slocum 78b6a96006 Merge branch 'main' into granule_merging_batch 2022-07-20 07:42:26 -05:00
sfc-gh-tclinkenbeard fe05cc5c72 Update busy read tag reporting in status json 2022-07-19 16:29:11 -07:00
Josh Slocum 306610bfcb batch periodic merging in blob manager 2022-07-15 15:52:10 -05:00
Ata E Husain Bohra f288abebc2 BlobFile Encryption and compression support
Fix formatting issues and rename KNOB

Description

Testing
2022-07-14 17:22:00 -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
Lukas Joswiak 407300bfa6 Disable testing of the remote key value store in simulation 2022-07-13 18:32:50 -07:00
Josh Slocum b85fbaef52
Merge pull request #7395 from sfc-gh-jslocum/bg_file_chunking
Chunked Snapshot Files
2022-07-13 17:22:34 -05:00
Josh Slocum 0b0ac16a4c Merge branch 'main' into granule_merging 2022-07-12 09:09:30 -05:00
Josh Slocum c6700fe62f Merge branch 'main' into bg_file_chunking 2022-07-12 08:28:06 -05:00
Josh Slocum 33fcdc4764 Change Feed and Blob Worker operational improvements 2022-07-11 12:29:51 -05:00
Chaoguang Lin 901d988de9
Add a knob SNAPSHOT_ALL_STATEFUL_PROCESSES to snapshot all processes with stateful class type(storage, log, transaction) even if they are not recruited (#7554) 2022-07-08 20:53:49 -07: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
Josh Slocum 9e64037b25 Merge branch 'main' into bg_file_chunking 2022-06-30 17:13:02 -05:00
Jingyu Zhou d60cab788e
Merge pull request #7502 from jzhou77/main
Add pipelining for secondary queries in index prefetch
2022-06-30 10:27:29 -07:00
Dan Lambright 98b18e3a18
Remove code obsoleted by commit c48d5690 (#7499) 2022-06-30 12:16:23 -04:00
Jingyu Zhou ba5e2ed72d Add batching for secondary queries in index prefetch
This is to reduce excessive load being issued concurrently, controlled by knob
MAX_PARALLEL_QUICK_GET_VALUE.
2022-06-29 21:17:11 -07:00
Chaoguang Lin 29f98f3654
Avoid duplicate snapshot on one process if it serves as multiple roles (#7294)
* Fix comments

* Add simulation value for SERVER_KNOBS->SNAP_CREATE_MAX_TIMEOUT

* A work version with correctness clean

* Remove unnecessay comments; debugging symbols

* Only check secondary address for coordinators, same as before

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

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

* Add retry for network failures

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

* Add retry limit as a knob and make backoff exponentail

* Add getDatabaseConfiguration(Transaction* tr)

* revert back to send request for each role once

* update some comments
2022-06-29 11:23:07 -07:00
Trevor Clinkenbeard db769667ae
Merge pull request #7112 from sfc-gh-tclinkenbeard/global-tag-throttling3
Create Global Tag Throttler
2022-06-29 10:06:00 -07:00
sfc-gh-tclinkenbeard be9a2002c3 Merge remote-tracking branch 'origin/main' into fix-knob-typo 2022-06-28 15:58:18 -07:00
sfc-gh-tclinkenbeard 086e4bff06 Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-28 10:18:13 -07:00
Lukas Joswiak 9ac7a1aed8 Increase buggified max version batch size
With a smaller byte limit, more `VersionBatch`s are created, resulting
in many more traces.
2022-06-27 22:44:09 -07:00
sfc-gh-tclinkenbeard 0c2bd73e28 Fix typo in SHARD_READ_HOT_BANDWIDTH_MIN_PER_KSECONDS name 2022-06-27 09:56:02 -07:00
Markus Pilman a47ed89018 Linux fixes and addressed review comments 2022-06-23 20:52:13 -06:00
sfc-gh-tclinkenbeard 840dac1fa3 Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-22 22:17:33 -07:00
Bharadwaj V.R 8cf2be030f
Build a TenantCache for use by DD (#7207)
* Add an DD tenant-cache-assembly actor
* Add basic tenant list monitoring for tenant cache. 
* Update DD tenant cache refresh to be more efficient and unit-testable
* Remove the DD prefix in the tenant cache class name (and associated impl and UT class names); there is nothing specific to DD in it; DD uses it; other modules may use it in the future
* Disable DD tenant awareness by default
2022-06-21 16:29:30 -07:00
sfc-gh-tclinkenbeard 2391e58fb2 Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-21 10:09:15 -07:00
sfc-gh-tclinkenbeard 0216740c0c Add /GlobalTagThrottler/Simple unit test 2022-06-15 17:21:54 -07:00
Josh Slocum 3f871f4123 Chunked Snapshot Files passes unit test 2022-06-15 14:52:28 -05:00