Repository navigation
tentacle: osd: Correct missing list on divergent merge of partial writes - #70570
Conversation
|
Not expecting audit to pass. Original included recreates in a test harness which does not exist in Tentacle. |
|
Overriding audit as the two merge conflicts are intentional. Functional change applies cleanly |
|
@aainscow: what's the plan on this backport? |
|
Not sure why I closed that. |
|
jenkins test make check |
|
/audit override |
…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)
e0819f6 to
e07a978
Compare
There was a problem hiding this comment.
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
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)
src/test/osd/ECPeeringTestFixture.ccsrc/test/osd/TestECFailoverWithPeering.cc
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.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
|
@aainscow this PR is part of the |
|
This PR has been added to wip-yuri13-testing-20260729.211123-tentacle. |
bill-scales
left a comment
There was a problem hiding this comment.
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
backport tracker: https://tracker.ceph.com/issues/77099
backport of #68727
parent tracker: https://tracker.ceph.com/issues/75962
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh