Commit Graph

45 Commits

Author SHA1 Message Date
Syed Paymaan Raza 392bad2bd3
More copyright end year updates (#11556) 2024-08-05 14:00:32 -07:00
Dimitris Apostolou a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
Zhe Wang 55c023a815
Improve visibility of consistency checker (#11018)
* improve visibility consistency checker

* fix for CI failure
2023-10-24 13:21:07 -07:00
Josh Slocum 0e6216e926
fix per-scan-loop throttling to properly throtte in the loop (#10502) 2023-07-10 13:02:12 -04:00
Josh Slocum 356d0030a4
fixed consistency scan corruption check when worker is hard-killed in the middle, and improved debugging for stuck consistency scan (#10516) 2023-06-22 11:54:08 -05:00
Josh Slocum 01ce1ab24d
fix consistency scan ubsan issue and replication factor calculation (#10492) 2023-06-15 08:10:49 -05:00
Hui Liu 630013cfd9
Fix MoveKeysClean.toml failure (#10470) 2023-06-13 08:45:03 -07:00
Josh Slocum 31e4610b56
misc operational and documentation improvements (#10465)
* misc operational and documentation improvements

* fixing doc build
2023-06-12 15:14:01 -05:00
Josh Slocum b209cd5d19
Consistency scan polish (#10445)
* added operational metrics and some polish

* moving consistency scan enablement in simulation tests to main tester workflow

* more stats and throttling polish
2023-06-08 14:18:58 -05:00
Josh Slocum 220b7d1a37
Consistency scan test improvements (#10402)
* adding consistency scan clear stats and testing in simulation

* Adding test that intentionally injects corruption in consistency scan requests and ensures the scan finds it

* cleanup

* adding assert false to disabled code
2023-06-07 07:21:47 -05:00
Josh Slocum f9a6b54863
Correctly throttling consistency check on error case (#10412) 2023-06-06 13:12:40 -05:00
Josh Slocum 2344a419bd
fixing consistency scan loop and completion check (#10345)
* fixing consistency scan loop and completion check

* fixing ide build
2023-05-25 18:29:03 -05:00
He Liu 8ad7ec6fdf
Psm ss (#9817)
* Update NativeAPI getCheckpointForRange().

* Implemented checkpoint in SS.

* clean up.

* Disabled StorageServerCheckpointTest.

* Serialized checkpoint creation and deletion.

Simplified checkpoint GC, via deleting CheckpointMetaData::dir.

* Fixed PhysicalShardMove test. Where fetchCheckpoint target range is misset.

* Minor improvements on CheckpointMetaData and DataMoveMetaData.

* fmt.

* Optimized PhysicalShardMove test

cleanup.

* Refactored ShardedRocks checkpoint/restore for psm.

* Complete ShardedRocks::restore.

* dismiss operation_obsolete, and throw actor_cancelled.

* Validate checkpoint when !asKeyValues.

* fmt.

* Don't read from uninitialized physical shard.

* Resolved commments.

* cleanup.

* Added verify_checksum_before_restore for ShardedRocks.

* Added ShardedRocksDB checkpoint/restore unit test.

* Populate CheckpointMetaData::dir in RocksDB.

* Rename MovingIn as Adding.

* Added StorageServerUtils.

* Added physical shard move in SS.

* Fix on ApplyMetaData, doFetchFile error handling etc.

* Debugging incorrect shard size.

* Create/delete checkpoints only when Physical shard move is enabled.

* Added back SHARD_ENCODE_LOCATION_METADATA.

* Fixed bytesSample incorrect issue.

Essentially dedicated CheckpointRocksDBCF as key-value based checkpoint, will need to add a new format for the file-based checkpoint.

* Cleanup.

* Cleanup & compile rocksdb with 8.1 branch.

* clean up.

* clean up.

* Allowed request_maybe_delivered error type in FetchShard.

* Added FDBRocksDBVersion.h.

* Fixed stuck fetchShard.

* Don't create checkpoint on TSS.

* Upgrade to RocksDB 8.1.1

* Cleanup.

* Fixed accidently deleted db_path and name fields.

* Improved trace event.

* Removed redundants from previuos ShardedrocksDB.

* Cleanup.

* cleanup.

* cleanup.

* reanme `state`.

* Cleanup.

* Removed excessive TraceEvent.

* * Fixed shardMap race condition on different threads
* Added *Stats, logging data move rates.
* Added `DD_PHYSICAL_SHARD_MOVE_PROBABILITY` to support hybrid data move.

* Resolved comments.

* fmt.

* Use physical shard move in PhysicalShardMoveTest.

* Enforce physical-shard-move for PhysicalShardMoveTest.

* fmt
2023-05-23 11:18:35 -07:00
Yanqin Jin 2951fe7033 Fix 2023-05-19 15:23:37 -07:00
Jingyu Zhou 58999e493f Also check storage servers are in different DCs 2023-05-18 16:57:58 -07:00
Jingyu Zhou c2e30d3829 format code and remove an unused variable 2023-05-18 15:00:18 -07:00
Jingyu Zhou b1d0e9c578 Merge branch 'main' of https://github.com/apple/foundationdb 2023-05-18 14:42:35 -07:00
Josh Slocum 2916a11a86
New ConsistencyScan (#10265)
* Remove duplicate getRange() for DB handles and update existing GetRange to accept DB handles.

* Initial progress checkpoint on new ConsistencyScan role.

* Updated TODOs, finished most if not all state updates.

* placeholder

* Add more TODOs, documentation and comment improvements.

* Checkpoint round state to avoid advancing progress if commit fails.

* Bug fix, check is supposed to be for overlap, not lack of overlap.

* Added more TODO's and added faked read results / exceptions and faked DB size retrieval to prove the consistencyScanCore logic works.

* Update JSON schemas and command help.

* Add comment about lifetime stats reset.

* More TODO comments and some renames for clarity, some bug fixes.

* properly stopping consistency scan in simulation so that it doesn't run forever and cause quiet database to fail

* removing trailing comma from consistency_scan json schema

* Making CC inconsistency not an error if it's intentional tss corruption

* consistency scan actually reads storage locations

* added check that consistency scan actually completes a round in simulation, fixed bug and added debugging around consistency scan getting stuck

* made consistency scan properly fetch database size

* refactoring data check to be used in both consistency scan and consistency check

* checking that consistency scan always completes at least one round and doesn't get stuck

* cleanup

* fixing ide build

* consistencyscan fdbcli command wasn't actually changing db state

* consistencyscan fdbcli command always said enabled even when it wasn't

---------

Co-authored-by: Steve Atherton <steve.atherton@snowflake.com>
2023-05-18 15:02:41 -05:00
Jingyu Zhou eff338f7bd Fix ConsistencyCheck_DataInconsistent failure in simulation
In the KillRegion workload, a force recovery can intentionally kill a region
and recover from another region with data loss. It's possible that when the
ConsistencyScan (CS) role is checking a shard from two storage servers, the
one from the failed region returned first for a higher version, then the SS
was killed. Later, CS got data from the second SS from a different region,
where forced recovery rollback happened and a lower version value was returned.
In this case, even though the data is inconsistent, we shouldn't fail the test.

Reproduction:
  commit: 8e0c9eab8 on release-7.3 branch
  seed: -f ./tests/fast/KillRegionCycle.toml -s 2713020850 -b on
  build: gcc
2023-05-17 22:52:11 -07:00
Evan Tschannen c8e8505101
buggified max_shards_on_large_teams (#10105)
* buggified max_shards_on_large_teams, and had the consistency scan verify the proper number of shards have been overreplicated

* fix: when restarting the data distributor, do no allow more than max_shards_on_large_teams shards to be marked as healthy
2023-05-08 16:56:42 -07:00
Jingyu Zhou 5e8feac8c9 Fix ConsistencyCheck_InvalidShardSize due to unfair split
ConsistencyCheck thinks the shard is too large and should be split. However, it
is possible that the split point returned by the Storage Server is discarded
due to "unfair" sizes after the split. Fix this problem by checking if this is
the case in ConsistencyCheck.
2023-04-28 11:35:05 -07:00
Steve Atherton 858b51a69b Address review comments. KeyRangeMapSnapshot is now ReferenceCounted and getSnapshot() returns a Reference to discourage copying. Added several comments for clarity. Added FormatUsingTraceable and changed all new formatters to use it except for Standalone<T> which redirects to the formatter for T. 2023-04-24 19:01:05 -07:00
Steve Atherton c57ed25987 Renamed SystemDBLockWriteNow() to SystemDBWriteLockedNow() and changed definition to be more direct / clear. 2023-04-22 13:17:41 -07:00
Steve Atherton 639d4d05ef Removed SYSTEM_PRIORITY_IMMEDIATE from KeyBackedTypes and all options from KeyBackedRangeMap database functions. Added SystemTransactionGenerator<> for wrapping Database types and generating transactions with selected system level options. 2023-04-21 19:00:29 -07:00
Steve Atherton ebb3c8d698 Apply clang-format, debug output changes. 2023-04-18 22:21:27 -07:00
Steve Atherton bc6b9cb83f Added toJSON for DD Range configuration. 2023-04-18 22:21:27 -07:00
Steve Atherton 53ee26d758 Changed KeyBackedTypes to an actor file. Added TypedKeySelectors for Map and Set classes and getRange() keySelector methods. Added debug macro for KeyBackedTypes. Rewrote KeyBackedRangeMap using keyselectors on KeyBackedMap. 2023-04-18 22:21:19 -07:00
Steve Atherton b7e68bbf51 DDConfiguration class for modeling user specified key range configuration options. Added KeyBackedRangeMapSnapshot, some other supporting changes to KeyBackedTypes. Added invalidKey to give KeyBackedTypes a safe prefix to avoid accidental userspace modification from uninitialized accessors. 2023-04-18 22:09:18 -07:00
Dan Adkins 02f0a44987
Avoid divide-by-zero in isKeyValueInSample. (#9799)
In the pathological case that both key size and value size are 0,
the probability of choosing that key-value pair is 0, and we divide
by zero when computing the sampledSize.

This change adds documentation to that function, which was quite
difficult to understand. In addition, we add `probability` to the
returned values, since one of the callers was backing it out from
sampledSize and itself in danger of dividing by zero.
2023-03-24 16:05:26 -04: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
A.J. Beamon dc2bd78aa7 The consistency check should retry if it couldn't find all the commit proxies when getting key server locations 2023-03-17 12:00:47 -07:00
Evan Tschannen de7f40d2f4 made a variety of improvements that came from code review 2023-03-17 10:30:34 -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
Evan Tschannen 4a17ed363a Fix: the consistency check did not properly report failed tests 2023-03-08 16:56:23 -08:00
Jingyu Zhou 496b29aa3c
Update fdbserver/ConsistencyScan.actor.cpp 2023-01-23 09:34:04 -08:00
Jingyu Zhou 78838f1c74 Fix a consistency scan infinite looping
If a storage server was removed, the consistency scan may be looping forever,
because "request_maybe_delivered" was not handled.
2023-01-14 09:33:00 -08:00
A.J. Beamon 3e9b6ce937 Don't disallow a seed value of 0 2022-12-02 15:32:34 -08:00
A.J. Beamon 304747d387 The simulator was changing the configuration of the cluster while the consistency check was expecting a quiescent database 2022-11-03 08:35:34 -07:00
Jingyu Zhou c127bb1c30 Fix some clang warnings on unused variables 2022-11-01 15:38:47 -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 3c67b7df39 extract serveStorageMetricsRequests template function 2022-10-24 09:58:41 -07:00
Vishesh Yadav aa99b89d53 Don't fail ConsistencyCheck on first mismatch
ConsistencyCheck fails when it sees the first corrupted shard. We may want to
keep it running so that we can see all the corrupted data in logs.
2022-10-21 17:02:02 -07:00
Sreenath Bodagala e83229ed8b
- Version vector specific: Propagate the latest commit version, as (#8393)
part of the read request, when reading from a storage server.
2022-10-05 16:23:56 -04: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