Commit Graph

424 Commits

Author SHA1 Message Date
Jingyu Zhou f1ecdb3a99
Fix backup worker assertion failure on memory usage (#12046)
* Fix backup worker assertion failure on memory usage

pullAsyncData() can be cancelled thus not take() some of the memory used by
the in memory queue.

20250320-171737-jzhou-752fd8c45fdadd4a

100k tests/slow/ParallelRestoreNewBackupCorrectnessAtomicOp.toml
20250320-172251-jzhou-3bc7db8e7ce5e1de

* Refactor such that messages in the queue have to reserve memory first

Thus, when we release the memory, it must have already been reserved.

100k ParallelRestoreNewBackupCorrectnessAtomicOp.toml
20250320-234748-jzhou-a159972dd0a72e03

20250320-235252-jzhou-54a6ae8c67873b59

* Fix a backup worker assertion failure

The pop version obtained from GRV proxy replies may go backwards, which can
cause assertion failure when pulling mutations, i.e., missing mutations. Fix
this bug and add an assertion that popVersion can go lower.

100k 20250321-012019-jzhou-01eb56938cf0a3fc

100k tests/slow/ParallelRestoreNewBackupCorrectnessAtomicOp.toml
20250321-012144-jzhou-68181bb51aedbb5d

* Fix assertion failure of triggered version

The triggered version could be the same as popVersion.

20250321-025429-jzhou-a088c3f119331b93

100k tests/slow/ParallelRestoreNewBackupCorrectnessAtomicOp.toml
20250321-025532-jzhou-77e2dbd5fd035157

* Update fdbserver/BackupWorker.actor.cpp

Co-authored-by: Syed Paymaan Raza <1238752+spraza@users.noreply.github.com>

---------

Co-authored-by: Syed Paymaan Raza <1238752+spraza@users.noreply.github.com>
2025-03-21 13:55:27 -07:00
Sreenath Bodagala 56402dbbf1
Extend the unicast based recovery algorithm to do the replication policy check (#11996)
* - Extend the unicast based recovery algorithm to do the replication policy check

* - Review comments related changes

* - Review and compilation related changes
2025-03-12 18:01:38 -04:00
Dan Lambright 8bba38b180
Version vector: compute locations only once during commits. (#11924)
* During commits with version vector enabled, compute location list only once, as recalcuating could
generate a different random number, hence a different set of locations.

* Respond to review comments.

* Select replicas from locations returned from resolver.

* Respond to review comments

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-03-04 17:09:06 -05:00
Sreenath Bodagala af7b34e431 - Correct an issue to do with populating the list of reporting log servers
during recovery with version vector - the list of reporting log servers
should include even those that have an empty unknown committed version list.
2025-02-25 20:32:22 +00:00
Sreenath Bodagala 9adaa6eef2
Do not use "safe range" logic in recovery code when version vector is enabled #11887
* - When version vector is enabled use "min(DV)" as the recovery
version when trying to decide whether to restart recovery or not.

* - Address a review comment

* - Address a review comment
2025-02-10 14:38:19 -08:00
Sreenath Bodagala 97847f3fbf - Do not do the replication policy validation check when trying to
find the recovery version in the context of version vector. We will
need to extend the version vector recovery algorithm to do this
check in an efficient manner later.
2025-01-17 11:11:15 +00:00
Sreenath Bodagala 5a88f43ca0
- Use "count()", instead of "size()", to find the number of bits set (#11857)
in a dynamic_bitset structure.
2025-01-03 13:38:27 +05:30
Sreenath Bodagala 36829092b3
- Modify the unicast-based recovery version computation algorithm (#11770)
the following ways:

- Make it use "max(KCV)", instead of "min(KCV)", as the default
recovery version
- Make it return the <max(KCV), recovery version> pair as output
- Make the invoker use the "max(KCV)" version returned by the
algorithm
- Address a bug related to the computation of recovery version (in
the case where a subset of log servers have empty
"unknownCommittedVersions" list)

And, make the invoker compute the max() and min() of recovery versions
of primary and satellite DCs based on the recovery versions computed
by the appropriate (with/without unicast) recovery version computation
algorithms.
2024-12-03 11:41:32 -05:00
Johannes M. Scheuermann 786a220e35 Add log system debug ID to trace event 2024-11-12 14:32:24 +01:00
Dan Lambright a63631f68c
fix vv unicast recovery for streaming peek. (#11745)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-11-03 12:43:44 -05:00
Dan Lambright 9790a53f7c
Propagate rv to tLogs on version vector recovery (#11677)
* refactor management of cluster recovery version (crv)

- send the crv to tlogs as they rejoin cluster during recovery, not
just when an rv is computed.
- if a tlog has not yet received the crv, wait for it

* Propagate cluster recovery version to tlog for version vector recovery
Enable RECORD_RECOVER_AT_IN_CSTATE to store recovery version in cstate

* respond to review comments

* - dont sent rv to old tlog generations
- send crv after locking, if rv computed

* Remove CRV RPCs, have cursor pad beyond end tlog to RV

* Send end version in peek request to facility vv recovery

* Fix serialization in peek request interface.

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-10-22 17:54:26 -04:00
Syed Paymaan Raza c146ee0869
[fdbserver] Use STL contains method and std::find for containment checks (#11702) 2024-10-15 11:40:02 -07:00
Jingyu Zhou f86058fba6
Remove the usage of txsTag (#11688)
* Add assertions to code paths with txsTag

txsTag should be obsolete by now, since it's used in 6.1, which is no longer
supported for upgrade.

* Actually remove txsTag usage

20240926-225930-jzhou-7ed3304c415ae65e

* Remove more code

20240926-235242-jzhou-7ed3304c415ae65e

* Disable two verbose trace events

They can cause TraceTooManyLines errors.
2024-09-30 07:53:37 -04:00
Jingyu Zhou 70f9440e7d
Merge pull request #11648 from sbodagala/main
Refactor version vector related recovery version computation logic
2024-09-23 14:06:21 -07:00
Sreenath Bodagala 3cd26fb9da - Another const related change 2024-09-20 17:11:54 +00:00
Sreenath Bodagala 2cf2e3ea43 - Address PR review comments 2024-09-20 16:53:18 +00:00
Jingyu Zhou 35c0580f9f Remove collectTags from BufferedCursor
No need to support upgrades from 5.x to 6.0 now.

20240918-174602-jzhou-75febe944d1d84b3
2024-09-18 11:23:09 -07:00
Jingyu Zhou fc30fc269e Remove dead code after removing tagLocalityUpgraded usage
20240918-170752-jzhou-33111b2c3e6776aa
2024-09-18 11:23:09 -07:00
Jingyu Zhou 7b76561bb9 Remove tagLocalityUpgraded usage at various places
Since we have removed old tlog implementation, so the code path using this tag
can be deleted to simplify the code.
2024-09-18 11:23:09 -07:00
Sreenath Bodagala 9ebb1b7391 - Disable logWriteAntiQuorum when version vector is enabled
- Refactor the version vector related recovery version computation
logic in order to make it work better with the recovery restart logic
2024-09-11 19:51:41 +00:00
Sreenath Bodagala daca092939
- Address a bug related to computing the ids of log servers (#11623) 2024-09-03 21:15:08 -07:00
Dan Lambright 4e96c3cab2
refactor to use struct rather than tuple for "uncommitedVersions" (#11619)
* refactor to use struct rather than tuple for uncommitedVersions

* Document UnknownCommittedVersions struct

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-08-30 14:28:14 -07:00
Sreenath Bodagala e490ba8c21
Address an assertion failure (#11617) 2024-08-29 11:22:30 -07:00
Dan Lambright bf292a6c95
Stash correct id for tlog idenfication in recovery (#11604)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-08-26 15:39:40 -04:00
Dan Lambright d040b9a24c
check existence of optional interface (#11593)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-08-22 23:28:30 -04:00
Dan Lambright 94fba2cce0
cluster level RV when tLogs advance at different rates (#11557)
* simulate more than one tlog

* Draft use cluster RV for tlogs in version vector

* add TestTLogRecovery2

* Respond to review comments

* Add assert

* Send clusterRV to all locked tlogs

* Fix typo on rebase

* add memory managed IdToInterf structure

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-08-22 16:17:02 -04:00
Sreenath Bodagala 7efbf9f041
Recovery version computation when version vector unicast is enabled (#11565)
* - Recovery version computation when version vector unicast is enabled

* - Address a review comment

* - Modify code to not use "max(DV)" as the starting recovery version

* - Remove references to "max(DV)"

* - Address a review comment

* - Address PR review comments

* - Address a review comment
2024-08-20 13:58:18 -04:00
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Xiaoge Su b324bfb9b9
When a commit is cancelled, record all unresponsive/failed TLogs (#11459)
* When a commit is cancelled, record all unresponsive/failed TLogs

* fixup!

* fixup!

* fixup!
2024-07-23 17:26:11 -07:00
Dan Lambright bd3769cc49
Fix calculation of empty messages for vv case (#11224)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-02-27 17:20:36 -05:00
Dimitris Apostolou a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
Zhe Wu b2197e0062 Do not track TLog recovery if old generations have invalid recover at version. This can happen when we just turn on tracking TLog recovery. 2023-05-16 13:20:00 -07:00
Zhe Wu a956979c32 Replace oldestGenerationStartVersion with oldestGenerationRecoverAtVersion 2023-05-16 13:09:34 -07:00
Zhe Wu 0bdfe1889b Add recovered at in CSTATE, and use a knob to guard the use of it 2023-05-16 12:47:00 -07:00
Zhe Wu 9c81ba3444 Address comments 2023-03-27 14:41:21 -07:00
Zhe Wu 1d7fec933d Fix backup tests 2023-03-27 11:47:13 -07:00
Zhe Wu b3902bd4ca When GC earlier TLog generations, we also need to make sure we don't remove any generations that is newer than the oldestBackupEpoch 2023-03-27 11:47:13 -07:00
Zhe Wu d576d9a66a Remote debug TraceEvent 2023-03-27 11:47:11 -07:00
Zhe Wu 40dc54223c Add GC generation test, and make all simulation test passing 2023-03-27 11:46:13 -07:00
Zhe Wu 2da86c37aa Add a knob to guard track tlog recovery 2023-03-27 11:42:27 -07:00
Zhe Wu c1f1f189ff Remote recovered generation in core state in cluster controller 2023-03-27 11:42:27 -07:00
Zhe Wu 37f1f2bfa8 Cluster controller tracks tlog recovery 2023-03-27 11:42:27 -07:00
Zhe Wu 78bef8110b Track tlog recovery: tlog side implementation 2023-03-27 11:42:27 -07:00
Jingyu Zhou 0259a243ae Switch DC if log router peek becomes stuck
Trying to a different DC if this happens.
2023-03-06 17:41:56 -08:00
Zhe Wu 087d37d10b Add event for txn server initialization and a warning for TLog slow catching up 2023-01-11 10:02:06 -08:00
sfc-gh-tclinkenbeard 3c97f43138 Change Histogram::Unit::microseconds to milliseconds 2022-11-21 08:03:56 -08:00
sfc-gh-tclinkenbeard c9968f5c0c Mark several methods of ILogSystem, IPeekCursor and LogPushData const 2022-11-15 14:57:32 -08:00
Zhe Wu 32bc9b6ebb Fix a race condition between batched peek and pop, where the server removal pop may be lost 2022-11-04 15:05:37 -07:00
Lukas Joswiak 9d3c3b1efe Remove cluster ID logic from individual roles
The logic to determine the validity of a process joining a cluster now
belongs on the worker and the cluster controller. It is no longer
restricted to tlogs and storages, but instead applies to all processes
(even stateless ones).
2022-10-27 13:56:13 -07:00
Jingyu Zhou a8391caf23 Revert "Data loss protection v2" 2022-10-20 18:09:58 -05:00