Commit Graph

716 Commits

Author SHA1 Message Date
Jingyu Zhou 2d2a2144f4
Update copyright years to 2013-2026 (#12653)
No functional changes.
2026-01-22 10:49:41 -08:00
Jingyu Zhou dfbde65a14
Remove blob failure injections (#12620)
* Remove blob failure injections

Follow-up for the cleanup done at #12435. These functions are unused now.

* Fix an assertion failure in simulation

sim2 has "ASSERT(seconds >= -0.0001);" in delay() function, which was
triggering from the tlog code.

Reproduction:

-f ./tests/fast/SidebandSingle.toml -s 3567205446 -b on
2026-01-06 16:09:11 -08:00
Dan Lambright 2d52509099
Reserve vector capacity for tempTagMessages in TLog commit path (#12571)
* Reserve Vector Capacity for tempTagMessages

* Add knob ENABLE_TLOG_TEMP_TAG_MESSAGES_RESERVE

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-12-17 13:50:30 -08:00
Dan Lambright 7b38e176b2 Rename tempTagMessageCount to tagMessageCount 2025-11-19 16:14:37 -05:00
Sreenath Bodagala 516351df7f
Version vector feature specific: add a counter to capture the unknown committed version count (#12506)
* - Add a (version vector feature specific) counter to capture the number of unknown
committed versions on a tLog

* - Populate the counter correctly
2025-11-03 12:19:38 -05:00
gxglass 16a9edab44
delete cacheTag (#12492)
* delete cacheTag per code review request. Follow-up on PR#12486, deletion of storage cache feature.

* clean up comment about tagLocalitySpecial
2025-10-21 22:42:18 -07:00
Dan Lambright 7e2f99a1ba
Make DirtyTagsProcessed count only tags that touch persistentData (#12468)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-10-17 10:19:55 -04:00
Dan Lambright 9590c552ac
Track temp tag message counts in TLogMetrics (#12460)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-10-16 11:59:35 -04:00
Dan Lambright 785fe5d916
counters for dirty tags in TLogServer (#12427) 2025-10-10 20:18:06 -04:00
Dan Lambright 3881494467
Optimize peekTracker lookups to use single try_emplace instead of find+lookup (#12407)
* Optimize peekTracker lookups to use single try_emplace instead of find+operator[] pattern

* respond to review comments

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-10-02 15:59:51 -04:00
Dan Lambright afeef452b8
TeamScale cleanup for TLogServer.actor.cpp (#12406) 2025-09-30 23:17:08 -04:00
Dan Lambright 6bfe9da303
Optimize peekVersionCounts to use single map op instead of three lookups. (#12402)
* Optimize peekVersionCounts/blockingPeekLatencies to use single map operation instead of three separate lookups

* Use underscore for unused binding variable

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-09-30 19:35:48 -04:00
Syed Paymaan Raza b06714dfd3
Revert "- In case of spill by reference, log servers should use the logic that (#11815)" (#12299) 2025-08-14 11:29:26 -07:00
Sreenath Bodagala 2d5d695617
Make log servers return an empty version range only when it is correct to do so (#12188)
* In the context of version vector/unicast, make log servers return
an empty version range (on peeks) only when it is correct to do so.
This is so the receiver will receive all versions (even though the
sender is sending an empty version range) that it is supposed to
receive.

Changes:
- Make the cluster controller collect the set of log servers participated
in recovery and propagate that information to the other processes.
- Extend the ServerPeekCursor to take a flag that tells the source log
server whether it can return an empty version range or not (in the context
of version vector/unicast), and make the source log server return an empty
version range only when this flag is set.
- Make the peek APIs set the flag appropriately when initializing
ServerPeekCursors.
- Also, take the internal logic used by SetPeekCursor and MergedPeekCursor
into account while initializing the above mentioned flag.

* - Update the member variable ("bestServer") after updating the argument

* - Review comments related changes

* - Review comments related changes
2025-07-16 14:39:54 -07:00
Dan Lambright 588c2a5f04
Use 'TLog' rather than 'Tlo' as standard for logs (#12142)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-05-09 21:25:20 -07:00
Dan Lambright 96be535a1f
ENABLE_VERSION_VECTOR_REPLY_RECOVERY can be T only if ENABLE_VERSION_VECTOR_TLOG_UNICAST is T (#12021)
* ENABLE_VERSION_VECTOR_REPLY_RECOVERY can be T only if ENABLE_VERSION_VECTOR_TLOG_UNICAST is T

* Respond to review comments

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-03-13 18:15:13 -04:00
Dan Lambright 78d4490acf
Add ENABLE_VERSION_VECTOR_REPLY_RECOVERY switch (#11889)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-01-16 15:10:06 -05:00
Sreenath Bodagala 3c43139a77
- In case of spill by reference, log servers should use the logic that (#11815)
is based over "TagData::popped" to decide how long to keep the disk
queue positions of versions in memory (instead of using the logic that
is based over "LogData::persistentDataVersion", which is applicable to
spill by value case).
2024-12-09 16:44:13 -05: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
Sreenath Bodagala c13f63fba8 - Move "unknownCommittedVersions" to LogData data structure. This
allows "unknownCommittedVersions" to be kept in sync with the
containing LogData's "knownCommittedVersion", which is needed in
order to find the correct recovery version in the presence of
multiple recovery restarts.
2024-09-06 14:58:10 +00: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
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
Jingyu Zhou a733e48048
Merge pull request #11517 from jzhou77/release-notes
Fix Wunused-but-set-variable warnings
2024-07-18 13:51:21 -07:00
Jingyu Zhou 3a3ee247ab Fix Wunused-but-set-variable warnings 2024-07-17 13:09:32 -07:00
Xiaoge Su cf70d45e6d Add PeerAddress to all PeerAddr/Peer TraceEvent
This is to address #4846
2024-07-09 16:49:22 -07:00
Jingyu Zhou fecffc93e4 Fix a segfault when tlog encounters platform_error
During destruction, rejoinClusterController actor should be cancelled to avoid
accessing TLogData object.
2024-05-17 11:40:22 -07:00
Dimitris Apostolou a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
Hao Fu 9b17dd8caf
Fix backup workers stability issues (#11044)
This PR includes a few stability fixes for Backup Worker

* Fixed memory bookkeeping issue in Backup Worker. Previously
it didn't release flow lock correctly when erasing messages.

* Added TLogServer fix to return 0 from poppedVersion() for
unrecognized log router tags.
2023-11-13 15:55:25 -08:00
Zhe Wu 83992d61ec Add a knob to guard the gray failure detection during TLog recovery 2023-08-29 14:49:39 -07:00
Zhe Wu 2078a0055a Add documentation 2023-07-26 14:16:16 -07:00
Zhe Wu f9c3ac3704 Remove debugging logging 2023-07-26 12:35:19 -07:00
Zhe Wu 00cdf09966 Cluster controller monitors recovery stats and trigger recovery if current recovery contains degraded servers 2023-07-17 11:14:22 -07:00
Zhe Wu 9670ed1cd8 Make TLog explicitely monitor connectivity issue during [start version, recover version] recovery 2023-07-17 11:12:28 -07:00
Evan Tschannen ef682d304e fix IKeyValueStore include 2023-06-16 13:28:40 -07:00
Evan Tschannen 359e178dcd Merge branch 'main' into feature-durable-change-feed
# Conflicts:
#	fdbclient/ClientKnobs.cpp
#	fdbserver/BlobManager.actor.cpp
#	fdbserver/worker.actor.cpp
2023-06-11 13:58:35 -07:00
Zhe Wu 1c290d3bc8 Make TLog server to handle empty oldGenerationRecoverAtVersions 2023-05-16 15:16:42 -07:00
Zhe Wu 1eae833ae2 test record_recover_at_in_cstate and track_tlog_recovery in restart test 2023-05-16 13:37:42 -07:00
Zhe Wu a956979c32 Replace oldestGenerationStartVersion with oldestGenerationRecoverAtVersion 2023-05-16 13:09:34 -07:00
Evan Tschannen 3dd86d6c22 move IKeyValueStore.h to the client 2023-05-10 15:41:47 -07:00
Dan Adkins aaa4860f76
Fix commit location accounting in DiskQueue. (#10075)
We encountered a situation in simulation where the disk queue was in the following state

    +------------+------------+
    | page 1     | page 2     |
    +------------+------------+
    |rec |.......|rec |.......|
    +------------+------------+
    0..85        4096..4181
    ^.   ^__             ^
    popped. committed    pushed

and we attempted to pop up to 4096, i.e. everything before page 2. This triggered
one of the assertions in the disk queue code which was meant to catch tlog logic
bugs where we pop too much.

The issue, though, is the accounting of the commit location in the disk queue.
While we only pushed records through position 85, we committed the entire page.
Attempts to pop everything before page 2 should have succeeded since we're not
attempting to pop any uncommitted data.

The solution is to fix the commit location accounting in the disk queue to round
up to the next page, to reflect the reality that we only commit entire pages.

This bug was discovered in the first place by introducing a delay into the commit
queue loop during simulation testing. That delay is included in this change.

We also noticed that getNextCommitLocation() was incorrect. Since there are no
users of that function, we've removed it entirely.
2023-05-02 12:33:29 -04:00
Zhe Wu 33736ff9af Cleanup GcGeneration test and function documents 2023-03-27 12:31:44 -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 78bef8110b Track tlog recovery: tlog side implementation 2023-03-27 11:42:27 -07:00
Dan Adkins b8c9c8b0f4 Add metric for tlog commit time minus time spent waiting in the queue. 2023-02-27 15:40:22 -08:00
Dan Adkins 37b6804f88 Add metric for queue wait time in tlog. 2023-02-27 15:40:22 -08:00