Skip to content

tentacle: osd: Correct missing list on divergent merge of partial writes - #70570

Merged
batrick merged 2 commits into
ceph:tentaclefrom
aainscow:wip-77099-tentacle
Aug 21, 2026
Merged

batrick merged 2 commits into
ceph:tentaclefrom
aainscow:wip-77099-tentacle

Conversation

@aainscow

Copy link
Copy Markdown
Contributor

@aainscow
aainscow requested a review from a team as a code owner July 27, 2026 12:08
@aainscow aainscow added this to the tentacle milestone Jul 27, 2026
@github-actions github-actions Bot added the core label Jul 27, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 27, 2026
@aainscow

Copy link
Copy Markdown
Contributor Author

Not expecting audit to pass. Original included recreates in a test harness which does not exist in Tentacle.

@aainscow
aainscow requested a review from bill-scales July 27, 2026 12:10
@aainscow aainscow changed the title tentacle: null tentacle: osd: Correct missing list on divergent merge of partial writes Jul 27, 2026
@aainscow aainscow added releng-audit-override and removed releng-audit-fail Release engineering: failed backport verification audit. labels Jul 28, 2026
@aainscow

Copy link
Copy Markdown
Contributor Author

Overriding audit as the two merge conflicts are intentional. Functional change applies cleanly

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 28, 2026
@aainscow aainscow closed this Jul 28, 2026
@rzarzynski

Copy link
Copy Markdown
Contributor

@aainscow: what's the plan on this backport?

@aainscow aainscow reopened this Jul 28, 2026
@github-actions github-actions Bot removed releng-audit-override releng-audit-fail Release engineering: failed backport verification audit. labels Jul 28, 2026
@aainscow

Copy link
Copy Markdown
Contributor Author

Not sure why I closed that.

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 28, 2026
@aainscow

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@aainscow aainscow added releng-audit-override and removed releng-audit-fail Release engineering: failed backport verification audit. labels Jul 29, 2026
@aainscow
aainscow requested a review from rzarzynski July 29, 2026 09:47
@aainscow

Copy link
Copy Markdown
Contributor Author

/audit override

aainscow added 2 commits July 29, 2026 13:59
…ist when merged.

When a log was applied for a partial write to an object that is async recovering, the
log will be rolled forward and the missing list updated.

If this log becomes divergent, then we must rollback the update to the missing list
in the merge.

Conflicts:
  src/test/osd/ECPeeringTestFixture.cc
  src/test/osd/TestECFailoverWithPeering.cc

The conflicts are because this test harness is under heavy development and is not
being backported to Tentacle.

Fixes: https://tracker.ceph.com/issues/75962
Signed-off-by: Alex Ainscow <[email protected]>
(cherry picked from commit f4237ca)
This function is difficult to review, because of the use of tabs. This change replaces each tab with 8 spaces.

Signed-off-by: Alex Ainscow <[email protected]>
(cherry picked from commit e6d22f2)
@aainscow
aainscow force-pushed the wip-77099-tentacle branch from e0819f6 to e07a978 Compare July 29, 2026 13:08

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ceph Release Engineering Audit Report

Commit Parity Visualizer

BACKPORT PR #70570 SOURCE PR SOURCE STATUS
2d40615 osd: Divergent logs for pure partial writes should roll back mising list when merged. PR #68727 f4237ca osd: Divergent logs for pure partial writes should roll back mising list when merged.
e07a978 osd: Change tabs to spaces in _merge_object_divergent_entries e6d22f2 osd: Change tabs to spaces in _merge_object_divergent_entries

Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations

⚠️ WARNING: Cherry-pick conflicts or deviations were found that require component lead review.

A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

This does not necessarily indicate an issue but a maintainer should review.

**Click to expand conflict summaries.**

Deviation in Backport 2d40615 (cherry-pick of f4237ca)

Affected File(s)

Range Diff

Click to expand
--- Original (f4237ca4)
+++ Backport (2d406152)
@@ -6,5 +6,13 @@
 If this log becomes divergent, then we must rollback the update to the missing list
 in the merge.
 
+Conflicts:
+  src/test/osd/ECPeeringTestFixture.cc
+  src/test/osd/TestECFailoverWithPeering.cc
+
+The conflicts are because this test harness is under heavy development and is not
+being backported to Tentacle.
+
 Fixes: https://tracker.ceph.com/issues/75962
 Signed-off-by: Alex Ainscow <[email protected]>
+(cherry picked from commit f4237ca47e0a270ebaa5bb7d94c6c73f00f6d57a)

================================================================================
RANGE DIFF
================================================================================

1:  f4237ca47e0 ! 1:  2d406152b21 osd: Divergent logs for pure partial writes should roll back mising list when merged.
    @@ Commit message
         If this log becomes divergent, then we must rollback the update to the missing list
         in the merge.
     
    +    Conflicts:
    +      src/test/osd/ECPeeringTestFixture.cc
    +      src/test/osd/TestECFailoverWithPeering.cc
    +
    +    The conflicts are because this test harness is under heavy development and is not
    +    being backported to Tentacle.
    +
         Fixes: https://tracker.ceph.com/issues/75962
         Signed-off-by: Alex Ainscow <[email protected]>
    +    (cherry picked from commit f4237ca47e0a270ebaa5bb7d94c6c73f00f6d57a)
     
      ## src/osd/PGLog.h ##
     @@ src/osd/PGLog.h: protected:
    @@ src/osd/PGLog.h: protected:
            /// Case 2)
            ldpp_dout(dpp, 10) << __func__ << ": hoid " << hoid
      			 << " prior_version or op type indicates creation,"
    -
    - ## src/test/osd/ECPeeringTestFixture.cc ##
    -@@ src/test/osd/ECPeeringTestFixture.cc: void ECPeeringTestFixture::run_parallel_recovery_and_verify_callbacks(
    - 
    -       ASSERT_EQ(target_missing_item, missing_item) << "Missing on shard and primary should match";
    - 
    --
    --      std::cout << "  OSD " << target_osd << " is a peer and has object " << obj_names[i] << " in peer_missing" << std::endl;
    -+      // Read the OI directly from the primary's store to get the authoritative version
    -+      // This avoids relying on potentially stale cached data in the OBC
    -+      ObjectStore::CollectionHandle primary_ch = chs[primary_shard];
    -+      ASSERT_TRUE(primary_ch) << "Primary shard " << primary_shard << " must have a valid collection handle";
    -+      
    -+      ghobject_t primary_ghoid(hoid, ghobject_t::NO_GEN, shard_id_t(primary_shard));
    -+      ceph::buffer::ptr oi_ptr;
    -+      int r = store->getattr(primary_ch, primary_ghoid, OI_ATTR, oi_ptr);
    -+      ASSERT_GE(r, 0) << "Failed to read OI_ATTR from primary store for " << obj_names[i];
    -+      
    -+      bufferlist oi_bl;
    -+      oi_bl.append(oi_ptr);
    -+      object_info_t oi;
    -+      auto p = oi_bl.cbegin();
    -+      oi.decode(p);
    -+      
    -+      std::cout << "  OSD " << target_osd << " is a peer and has object " << obj_names[i]
    -+                << " in peer_missing (OI version from primary store: " << oi.version << ")" << std::endl;
    -+      
    -+      // Verify the missing item's need version matches what we read from the store
    -+      ASSERT_EQ(missing_item.need, oi.version)
    -+        << "Missing item need version should match OI version from primary store for " << obj_names[i];
    -     }
    - 
    -     missing_items.push_back(missing_item);
    -
    - ## src/test/osd/TestECFailoverWithPeering.cc ##
    -@@ src/test/osd/TestECFailoverWithPeering.cc: TEST_P(
    -   run_recovery_and_verify_callbacks(obj_name, recovery_target_shard, pattern_p1);
    - }
    - 
    -+/**
    -+ * Test rollback after a sequence of blocked full-stripe and chunk writes.
    -+ * This is a similar scenario to the previous test, but we force the shard
    -+ * to do a sync, rather than async recovery at the end.
    -+ * Recreate for tracker https://tracker.ceph.com/issues/75962
    -+ */
    -+TEST_P(
    -+  TestECFailoverWithPeering,
    -+  RollbackAfterMixedBlockedWritesWithOSDFailure3
    -+) {
    -+  if (m < 2) {
    -+    GTEST_SKIP() << "RollbackAfterMixedBlockedWritesWithOSDFailure requires m >= 2";
    -+  }
    -+  set_config("osd_async_recovery_min_cost", "0");
    -+
    -+  const int blocked_shard = k + 1;
    -+  const int recovery_target_shard = 1;
    -+  const std::string obj_name = "test_mixed_blocked_writes";
    -+  const size_t full_stripe_size = stripe_unit * k;
    -+  const std::string pattern_p1(full_stripe_size, 'A');
    -+  mark_osd_down(recovery_target_shard);
    -+  create_and_write_verify(obj_name, pattern_p1);
    -+  mark_osd_up(recovery_target_shard);
    -+  create_and_write_verify("dummy", pattern_p1);
    -+  suspend_primary_to_osd(blocked_shard);
    -+  int result = write_attribute(obj_name, "test_attr", "value2", false);
    -+  ASSERT_EQ(-EINPROGRESS, result);
    -+  mark_osd_down(2);
    -+  unsuspend_primary_to_osd(blocked_shard);
    -+  event_loop->run_until_idle();
    -+
    -+  run_recovery_and_verify_callbacks(obj_name, recovery_target_shard, pattern_p1);
    -+
    -+  set_config("osd_async_recovery_min_cost", "100");
    -+}
    -+
    - // ---------------------------------------------------------------------------
    - // Instantiate TestECFailoverWithPeering with EC configurations
    - // ---------------------------------------------------------------------------

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 29, 2026
@yuriw

yuriw commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@aainscow this PR is part of the wip-yuri13-testing integration batch and still needs review approval before it can be merged. Could you request a review or ping a reviewer? Thanks!

@yuriw

yuriw commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri13-testing-20260729.211123-tentacle.

@bill-scales bill-scales left a comment

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.

LGTM - Back port of changes to production code (PGLog.h) is identical.

The uint test harness changes to get coverage of this change are not back ported to tentacle because the test harness has been heavily refactored and enhanced since tentacle. Unit test coverage in main and a back port of the fix without changes is sufficient

@amathuria

Copy link
Copy Markdown
Contributor

@aainscow aainscow added releng-audit-override and removed releng-audit-fail Release engineering: failed backport verification audit. labels Aug 12, 2026
@batrick
batrick merged commit 5200d93 into ceph:tentacle Aug 21, 2026
9 of 10 checks passed
@batrick batrick modified the milestones: tentacle, v20.2.5 Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants