Skip to content

Forward port #12298: Revert condition for releasing memory from tlog's versionLocation data structure - #12299

Merged
spraza merged 1 commit into
apple:mainfrom
spraza:main-743-tag-v216
Aug 14, 2025
Merged

spraza merged 1 commit into
apple:mainfrom
spraza:main-743-tag-v216

Conversation

@spraza

@spraza spraza commented Aug 13, 2025 •

Copy link
Copy Markdown
Collaborator

As title. See #12298 for details.

Main branch 100K Joshua: 20250813-230939-praza-main-743-tag-v216-f43-346f6a56cc3980e7 compressed=True data_size=40330757 duration=5860050 ended=100000 fail=1 fail_fast=10 max_runs=100000 pass=99999 priority=100 remaining=0 runtime=1:08:54 sanity=False started=100000 stopped=20250814-001833 submitted=20250813-230939 timeout=5400 username=praza-main-743-tag-v216-f43c339635295f6548ec255e8b42c0cbda2dac00

The 1 failure is not related. It's a DrUpgrade restart test which is failing because db is not quite at the end, due to dd being stuck. The change here should not change simulation determinism, so I actually went back to the previous change, re ran the test, and it ended up with the same failure, proving that this change is not causing the failure.

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)

@spraza
spraza marked this pull request as draft August 13, 2025 23:06
@foundationdb-ci

Copy link
Copy Markdown
Contributor

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

  • Commit ID: f43c339
  • Duration 0:24:33
  • 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
Copy Markdown
Contributor

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

  • Commit ID: f43c339
  • Duration 0:48:44
  • 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
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: f43c339
  • Duration 1:03:52
  • 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
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: f43c339
  • Duration 1:07:15
  • 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
Copy Markdown
Contributor

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

  • Commit ID: f43c339
  • Duration 1:12:57
  • 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)

@spraza
spraza requested a review from sbodagala August 14, 2025 05:15
@spraza
spraza marked this pull request as ready for review August 14, 2025 05:15
@spraza
spraza merged commit b06714d into apple:main Aug 14, 2025
if (minVersion != std::numeric_limits<Version>::max()) {
self->persistentQueue->forgetBefore(
minVersion,
newPersistentDataVersion,

@gxglass gxglass Aug 17, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meta-comment: apparently the old but correct logic fooled multiple experienced developers into thinking it was wrong 8 months ago. This suggests that increased clarity would help here. Suggestions:

  1. Can you put a comment above this section to explain what exactly this section of code is responsible for. What I mean is an explanation written against core concepts/required behaviors of the system, not just a translation of the code/algorithm into English.

  2. Also I think the existing FIXME comment about a heap is confused about how best to obtain its own stated purpose, which is to reduce overhead. If we think this iteration is too expensive then we can assign minVersion in a similar existing set of nested for loops, for example the loops starting on line 1137. That code seems to have the same loop structure and inner loop conditional logic as this loop here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I can add my interpretation with the caveat that I am still learning about disk queue. @sbodagala do you want to add these comments? If not, I can also add them.

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.

5 participants