Skip to content

Conversation

dlambrig
Copy link
Contributor

@dlambrig dlambrig commented Oct 8, 2025

This PR adds 10 unit tests for function getRecoverVersionUnicast covering:

Test Scenario
Simple Basic recovery with both TLogs reporting same version
FallbackToMaxKCV No UCVs → falls back to maxKCV
HaltOnMissingDelivery Missing delivery to available TLog → halt at previous version
PolicyNotSatisfied Version sent to both TLogs but only received by one (RF=2)
MinDVRespected Recovery version respects maxKCV boundaries
BrokenChain Broken prevVersion continuity → halt at last valid version
MultipleLogSets Recovery with primary + satellite LogSets
PartialAvailabilityPolicyFail RF=3 with only 2 TLogs responding
VersionsBelowMaxKCV Versions ≤ maxKCV are correctly filtered
PolicyNotSatisfied missing versions and partial delivery to subset of tLogs

fdbserver -r unittests -f /TagPartitionedLogSystem

Code-Reviewer Section

The general pull request guidelines can be found here.

Please check each of the following things and check all boxes before accepting a PR.

  • The PR has a description, explaining both the problem and the solution.
  • The description mentions which forms of testing were done and the testing seems reasonable.
  • Every function/class/actor that was touched is reasonably well documented.

For Release-Branches

If this PR is made against a release-branch, please also check the following:

  • This change/bugfix is a cherry-pick from the next younger branch (younger release-branch or main if this is the youngest branch)
  • There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)

@dlambrig dlambrig marked this pull request as draft October 8, 2025 19:06
@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 7e8f133
  • Duration 0:04:21
  • Result: ❌ FAILED
  • Error: Error while executing command: if [[ $(git diff --shortstat 2> /dev/null | tail -n1) == "" ]]; then echo "CODE FORMAT CLEAN"; else echo "CODE FORMAT NOT CLEAN"; echo; echo "THE FOLLOWING FILES NEED TO BE FORMATTED"; echo; git ls-files -m; echo; if [[ $FDB_VERSION =~ 7\.\3. ]]; then echo skip; else exit 1; fi; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: 7e8f133
  • Duration 0:04:22
  • Result: ❌ FAILED
  • Error: Error while executing command: if [[ $(git diff --shortstat 2> /dev/null | tail -n1) == "" ]]; then echo "CODE FORMAT CLEAN"; else echo "CODE FORMAT NOT CLEAN"; echo; echo "THE FOLLOWING FILES NEED TO BE FORMATTED"; echo; git ls-files -m; echo; if [[ $FDB_VERSION =~ 7\.\3. ]]; then echo skip; else exit 1; fi; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: 7e8f133
  • Duration 0:04:29
  • Result: ❌ FAILED
  • Error: Error while executing command: if [[ $(git diff --shortstat 2> /dev/null | tail -n1) == "" ]]; then echo "CODE FORMAT CLEAN"; else echo "CODE FORMAT NOT CLEAN"; echo; echo "THE FOLLOWING FILES NEED TO BE FORMATTED"; echo; git ls-files -m; echo; if [[ $FDB_VERSION =~ 7\.\3. ]]; then echo skip; else exit 1; fi; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 7e8f133
  • Duration 0:04:31
  • Result: ❌ FAILED
  • Error: Error while executing command: if [[ $(git diff --shortstat 2> /dev/null | tail -n1) == "" ]]; then echo "CODE FORMAT CLEAN"; else echo "CODE FORMAT NOT CLEAN"; echo; echo "THE FOLLOWING FILES NEED TO BE FORMATTED"; echo; git ls-files -m; echo; if [[ $FDB_VERSION =~ 7\.\3. ]]; then echo skip; else exit 1; fi; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-arm on Linux CentOS 7

  • Commit ID: 7e8f133
  • Duration 0:04:42
  • Result: ❌ FAILED
  • Error: Error while executing command: if [[ $(git diff --shortstat 2> /dev/null | tail -n1) == "" ]]; then echo "CODE FORMAT CLEAN"; else echo "CODE FORMAT NOT CLEAN"; echo; echo "THE FOLLOWING FILES NEED TO BE FORMATTED"; echo; git ls-files -m; echo; if [[ $FDB_VERSION =~ 7\.\3. ]]; then echo skip; else exit 1; fi; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: 3196429
  • Duration 0:04:13
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (3196429702db52c0408a6d717a3f6fe010a4878b) for primary source and source version 3196429702db52c0408a6d717a3f6fe010a4878b
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 3196429
  • Duration 0:04:20
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (3196429702db52c0408a6d717a3f6fe010a4878b) for primary source and source version 3196429702db52c0408a6d717a3f6fe010a4878b
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: 3196429
  • Duration 0:04:35
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (3196429702db52c0408a6d717a3f6fe010a4878b) for primary source and source version 3196429702db52c0408a6d717a3f6fe010a4878b
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-arm on Linux CentOS 7

  • Commit ID: 3196429
  • Duration 0:04:49
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (3196429702db52c0408a6d717a3f6fe010a4878b) for primary source and source version 3196429702db52c0408a6d717a3f6fe010a4878b
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 3196429
  • Duration 0:04:54
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (3196429702db52c0408a6d717a3f6fe010a4878b) for primary source and source version 3196429702db52c0408a6d717a3f6fe010a4878b
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x

  • Commit ID: 7e8f133
  • Duration 0:41:43
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: cd2e8da
  • Duration 0:26:21
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-macos on macOS Ventura 13.x

  • Commit ID: 7e8f133
  • Duration 1:09:46
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: cd2e8da
  • Duration 0:48:25
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-arm on Linux CentOS 7

  • Commit ID: cd2e8da
  • Duration 0:48:23
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: cd2e8da
  • Duration 0:59:53
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: cd2e8da
  • Duration 1:11:54
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@dlambrig dlambrig requested a review from sbodagala October 9, 2025 19:28
@sbodagala
Copy link
Contributor

Looks good.

Adding a test that makes a random version(s) in the range of (maximumKCV, highest version in the reported "unknownCommitVersionList") not getting reported/being received by only a subset of logs would be nice.

Any other cases we can add?

Thanks for preparing these tests!

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 74c18e7
  • Duration 0:04:04
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (74c18e7f5f4295be0f3da464deb68cda364c7109) for primary source and source version 74c18e7f5f4295be0f3da464deb68cda364c7109
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: 74c18e7
  • Duration 0:04:09
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (74c18e7f5f4295be0f3da464deb68cda364c7109) for primary source and source version 74c18e7f5f4295be0f3da464deb68cda364c7109
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: 74c18e7
  • Duration 0:04:13
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (74c18e7f5f4295be0f3da464deb68cda364c7109) for primary source and source version 74c18e7f5f4295be0f3da464deb68cda364c7109
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-arm on Linux CentOS 7

  • Commit ID: 74c18e7
  • Duration 0:04:32
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (74c18e7f5f4295be0f3da464deb68cda364c7109) for primary source and source version 74c18e7f5f4295be0f3da464deb68cda364c7109
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 74c18e7
  • Duration 0:06:07
  • Result: ❌ FAILED
  • Error: git checkout failed with exit status 128: fatal: unable to read tree (74c18e7f5f4295be0f3da464deb68cda364c7109) for primary source and source version 74c18e7f5f4295be0f3da464deb68cda364c7109
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@dlambrig dlambrig marked this pull request as ready for review October 10, 2025 00:49
@dlambrig
Copy link
Contributor Author

Looks good.

Adding a test that makes a random version(s) in the range of (maximumKCV, highest version in the reported "unknownCommitVersionList") not getting reported/being received by only a subset of logs would be nice.

Any other cases we can add?

Thanks for preparing these tests!

added. It verifies that recovery correctly handles versions in the range (maxKCV, highest_version) that are either missing from all UCVs or only received by a subset of available tLogs.

I think this is enough for now

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: 313e079
  • Duration 0:31:34
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang-arm on Linux CentOS 7

  • Commit ID: 313e079
  • Duration 0:48:29
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: 313e079
  • Duration 1:14:32
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 313e079
  • Duration 1:18:32
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 313e079
  • Duration 1:25:03
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@dlambrig dlambrig requested review from sbodagala and removed request for sbodagala October 15, 2025 14:44
@dlambrig dlambrig merged commit 9954593 into apple:main Oct 15, 2025
5 checks passed
@dlambrig dlambrig deleted the recovery-unittest branch October 15, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants