Commit Graph

923 Commits

Author SHA1 Message Date
Xiaoxi Wang dea76f62cf merge upstream/main without completely clean up conflicts 2023-03-20 16:01:00 -07:00
Evan Tschannen a258d775c3
Merge pull request #9710 from sfc-gh-etschannen/feature-custom-dd
Added the ability to manually create a shard and also increase its replication factor
2023-03-20 15:35:10 -07:00
Zhongxing Zhang d2c1b3124e
add a field to show average data movement bytes in MovingData trace (#9591)
* add a field to show average data movement bytes in MovingData trace

* change variable type

* Make changes to variable/function naming and add more comments

* move rolling window struct to a new file; deal with corner case: dd startup, elements are full

* format

* simplify codes

* modify file/struct name, universal to moving window

* fix typo

* add a new Knob to control MovingWindow::Deque size

* make the general use of dequeSize limit

* format

* format, use space rather than tab
2023-03-20 14:33:32 -07:00
Evan Tschannen ef20f1d973 code cleanup 2023-03-20 13:18:49 -07:00
Xiaoxi Wang 4615926d3f merge upstream/main and solve conflicts 2023-03-17 21:27:19 -07:00
Xiaoxi Wang 5f4e3a95c5 change run function use reference parameter rather than pointer 2023-03-17 20:59:18 -07:00
Evan Tschannen ac54962533 code cleanup 2023-03-16 09:47:21 -07:00
Evan Tschannen aaf7b9b32b Added the ability to manually create a shard and also increase its replication factor 2023-03-15 11:26:15 -07:00
Zhe Wang 0b6fa91056 fix dd storage audit race between serving request and resumption 2023-03-02 21:47:06 -08:00
Xiaoxi Wang 613391f40f Make DDQueue and DDShardTracker reference counted 2023-02-27 22:36:31 -08:00
Xiaoxi Wang 7e14324cc1 remove dataDistributionQueue actor and replace it with class DDQueue 2023-02-23 17:15:33 -08:00
Xiaoxi Wang 9cda7ebe5a encapsulate DDQueue constructor params into DDQueueInitParams 2023-02-23 15:38:48 -08:00
Xiaoxi Wang a6feafc371 remove dataDistributionTracker actor and use DataDistributionTracker class instead 2023-02-23 10:18:28 -08:00
Xiaoxi Wang 16404c5bdc make DataDistributionTracker constructor use DataDistributionTrackerInitParams 2023-02-22 15:36:15 -08:00
Jingyu Zhou 6c4a9b5f23 Fix DD stuck when remote DC is dead
When remote DC is down, the remote team collection of DD can initializing
waiting for the remote to recover (all_tlog_recruited state). However, the
getTeam request can already be served by the remote team collection. So, for
a RelocateShard (data movement such as split, move), it will get a team for
the remote DC. But the data movement can't make progress on the remote team
because the remote DC hasn't recovered yet. Because of the stuck of data
movement, the primary cannot reach the "storage_recovered" state and stay in
accepting_commit state.

The specifc test failure: slow/ApiCorrectness.toml -s 339026305 -b on
at commit:  0edd899d65

In this test, primary DC has 1 SS killed, remote DC has 2 TLog and 2 SS killed.
So the remote is dead, the remaining 2 SSes can't make progress because of the
loss of 2 TLogs. The repairDeadDatacenter() can't reach the "storage_recovered"
state due to DD's failure of moving shards away from the killed SS in the
primary.

The fix is to exclude all remote in repairDeadDatacenter() so that tells DD to
mark all SSes in the remote as unhealthy. Another fix is to return empty
results for getTeam request if the remote team collection is not ready. This
will allow the data movement to continue, essentially remote team is not changed
for the data movement.
2023-02-10 11:11:07 -08:00
He Liu eb4839d046
Fix audit_storage issues (#9265)
* Erase audit from DD after completion.

* Use CLIENT_KNOBS->TOO_MANY as the default number of rows for
get_audit_status.
2023-01-31 15:39:01 -08:00
Nim Wijetunga 82c92abca2
Change Noisy Sev30s to Sev20s (#9180)
change noisy sev30 traces to sev20
2023-01-19 14:06:34 -08:00
He Liu 00203c8732
Validate Storage part II (#8471)
* Implemented AuditUtils.actor.cpp

Moved AuditUtils to fdbserver/

* Persist AuditStorageState.

* Passed persisted AuditStorageState test.

* Added audit_storage_error to indicate a corruption is caught.

Throw/Send audit_storage_error when there is a data corruption.

Added doAuditStorage() for resuming Audit.

* Load and resume AuditStorage when DD restarts.

* Generate audit id monotonically.

* Fixed minor issue AuditId/Type was not set.

* Adding getLatestAuditStates.

* Improved persisted errors and added AuditStorageCommand.actor.cpp for
fdbcli.

* Added `audit_storage` fdbcli command.

* fmt.

* Fixed null shared_ptr issue.

* Improve audit data.

* Change DDAuditFailed to SevWarn.

* Sev.

* set SERVE_AUDIT_STORAGE_PARALLELISM to 1.

* Moved AuditUtils* to fdbclient/.

* Added getAuditStatus fdbcli command.

* Refactor audit storage fdb cli commands.

* Added auditStorage in sim.

* Cleanup.

* Resolved comments.

* Resolved comments.

* Test disabling audit for sims.

* Cleanup.

Co-authored-by: He Liu <heliu@apple.com>
2023-01-15 21:46:14 -08:00
Xiaoxi Wang bbcb3cc018 extract KeyBackedConfig, StorageWiggleData class; solve template resolution problem; solve MV txn and native api conflict by splitting RunTransaction file 2023-01-02 23:34:39 -08:00
Xiaoxi Wang 11a096567c Merge branch 'main' of https://github.com/apple/foundationdb into feature/main/wiggleDelay 2022-12-13 12:28:39 -08:00
Zhe Wu a6cd33134a Create per physical shard tracking data stucture. Not populate yet 2022-12-12 13:25:52 -08:00
Xiaoxi Wang aae89c863d DDTeamCollection.getAverageShardBytes 2022-12-07 10:08:22 -05:00
sfc-gh-tclinkenbeard a8b7a33a64 Randomly attempt duplicate snapshots in SnapTestWorkload 2022-12-05 14:28:44 -08:00
Xiaoxi Wang 6b77bcfc35 fix merge conflict upstream/main 2022-11-16 07:34:42 -08:00
Steve Atherton 959f77d03d
Merge pull request #8730 from sfc-gh-xwang/fix/main/restoreStats
Fix the omit StorageWiggler.restoreStats() bug
2022-11-15 22:37:39 -08:00
Xiaoxi Wang 907d7af966 solve merge conflict upstream/main 2022-11-15 14:59:31 -08:00
sfc-gh-tclinkenbeard c03f60c618 Update rare code probe annotations 2022-11-15 13:21:25 -08:00
Xiaoxi Wang f997e73758 rename variable and solve some light comments 2022-11-14 13:11:27 -08:00
Xiaoxi Wang b79268326a Merge branch 'main' of https://github.com/apple/foundationdb into feature/main/dataApi 2022-11-11 08:29:22 -08:00
Ankita Kejriwal 3b4e0056a7 Add a knob to enable/disable storage quota enforcement 2022-11-10 19:35:21 -08:00
Ankita Kejriwal 105648b888 Merge branch 'main' of github.com:apple/foundationdb into commitproxies 2022-11-09 17:38:30 -08:00
Xiaoxi Wang 4727449ef0 Merge branch 'main' of https://github.com/apple/foundationdb into fix/main/restoreStats 2022-11-08 15:35:15 -08:00
Xiaoxi Wang 317f0e9efe finish workload PerpetualWiggleStatsWorkload 2022-11-08 08:14:21 -08:00
Xiaoxi Wang c4d9a81d95 fix resetStats() bug 2022-11-07 13:25:57 -08:00
Xiaoxi Wang 09f77a785f add PrimaryRegion boolean 2022-11-07 12:58:14 -08:00
Xiaoxi Wang e321044310 make template method accomodate multi-thread transaction 2022-11-07 10:32:20 -08:00
He Liu bffa838398
Checkpoint restore with shard (#8667)
* Added SSPhysicalShard.

* Update physicalShards in StorageServer::addShard().

* Handle notAssigned shard.

* fetchKeys() are not stopped during TerminateStorageServer since
physicalShards are not cleared.

* Fixed addingSplitLeft unset shardId.

* Increased the timeout for Rocks reads in simulation.

* Cleanup.

* set SERVE_AUDIT_STORAGE_PARALLELISM to 1.

* Disabled ValidateStorage test.

* Resolved comments.

Co-authored-by: He Liu <heliu@apple.com>
2022-11-07 10:02:35 -08:00
Zhe Wu 3a02f919b9 Add some comments in DD and fix some nit 2022-11-07 09:11:16 -08:00
Xiaoxi Wang 03a9dd009a fix compilation errors 2022-11-06 22:46:54 -08:00
Xiaoxi Wang 8e6a9730ea move StorageWiggleMetrics out; add workload; try to fix the restore/reset bug (not test) 2022-11-03 23:42:44 -07:00
Ankita Kejriwal 27246dd4e6 Merge branch 'main' of github.com:apple/foundationdb into commitproxies 2022-11-03 18:11:56 -07:00
Ankita Kejriwal cd7e5fad00 Fetch the list of tenants over storage quota onto commit proxies from DD 2022-11-03 17:53:42 -07:00
Xiaoxi Wang 55a3db82b5 update the name, comment and discription of write byte sampling; update the calculation of write bandwidth metrics 2022-11-01 14:56:55 -07:00
He Liu 7bb823edbe
Replace KeyRange with std::vector<KeyRange> in DataMoveMetaData and (#8591)
* Replace KeyRange with std::vector<KeyRange> in DataMoveMetaData and
CheckpointMetaData.

* Checked if ranges.empty().

* fmt.

* Resolved some comments.

Co-authored-by: He Liu <heliu@apple.com>
2022-10-28 15:22:55 -07:00
Ankita Kejriwal 438cfea294 Send list of tenants over storage quota to commit proxies 2022-10-26 13:34:12 -07:00
Xiaoxi Wang bb0236433c
Merge pull request #8540 from sfc-gh-xwang/feature/main/storageMetrics
Make MockStorageServer serve StorageMetrics related request
2022-10-25 17:29:21 -07:00
Xiaoxi Wang 5a8adca1f7 solve review comments: mark const; add comments; template abbreviation 2022-10-25 10:56:24 -07:00
Ankita Kejriwal 7647cea4e5 Improve the storage quota monitor code + add a knob for refresh interval 2022-10-21 15:44:13 -07:00
Ankita Kejriwal a8b1154e45 Move the storage quota monitor from DataDistributor to TenantCache 2022-10-21 15:17:41 -07:00
Ankita Kejriwal fb014a4834 Merge branch 'main' of github.com:apple/foundationdb into monitorusage 2022-10-18 13:14:47 -07:00