Repository navigation
test/osd: EC extent cache tests for cache invalidation and growth holes - #72684
Conversation
bill-scales
left a comment
There was a problem hiding this comment.
Tests look good, commit messages need sorting, last commit includes a change to .github!
e28d373 to
c3690dc
Compare
|
This PR has been added to wip-bharath4-testing-20261016.224944-main. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
c3690dc to
367dfcc
Compare
41464f2 to
ac91a85
Compare
|
Please merge the PR once the review is complete and approved. If a rerun is required, remove the |
ac91a85 to
2a924b1
Compare
|
Rebased onto current main (head 2a924b1), trivial rebase: main gained new tests (from #72140) at the same place in src/test/osd/TestECFailoverWithPeering.cc where two of these commits add theirs, so I kept both blocks; no code was changed to resolve it. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
2a924b1 to
11bcd60
Compare
|
Rebased onto current main (head 5759603), trivial rebase: main gained new tests at the same place in src/test/osd/TestECFailoverWithPeering.cc where two of these commits add theirs, so I kept both blocks; no code was changed to resolve it. |
|
Rebased onto current main (head f02fb75), trivial rebase: no conflicts, and no change to the remaining patches ( |
11bcd60 to
f02fb75
Compare
|
jenkins test api |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
The MockPGBackendListener of each shard and of each split child was created without set_osd(), so every op got tid 0. Two reads in flight on one PG then hit ceph_assert(!tid_to_read_map.contains(tid)). Set the OSD on each listener so that tids are unique. Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
PrimaryLogPG::on_change() clears object_contexts but the mock listener did not, so a shard that became primary again reused object info and attrs cached in its previous term, stale after other primaries' writes. Clear them in MockPeeringListener::on_change() as the real PG does. Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Nothing tested partial-page writes queued behind a rollback of the same object. Such a write must read back the rolled-back data it does not overwrite, whether or not the object is in the extent cache. Queue writes behind a rollback in each case, then check every byte and scrub the object. Give write_attribute() the run flag that the other op helpers have, so that a test can queue it. Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
An older op dying could erase part of the growth hole of an op that grows the object. A following op then sent reads that all failed the read mask, and do_read_op hit ceph_assert(reads_sent). No test covered this. Add extent cache unit tests for the two paths that send the bad read, request() and read_done(), and an EC backend test driving the same sequence. MultiClient now asserts, as do_read_op does, that each backend read intersects the read mask. Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
An op that invalidates the extent cache (rollback, remove and recreate, shrinking truncate) replays the ops queued behind it. They read the object as it was before the invalidation and wrote that stale data back into the parts of their pages they did not overwrite. No test covered this. Queue partial-page writes behind each such op, with the object in and out of the cache, and check every byte and scrub the object. Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
CloneInvalidateStaleSize, TruncateGrowWithSuspendedReads and RollbackInvalidateRealistic were disabled when the 78465 fix was reverted. The new fix sends the replayed reads after the invalidating write, so enable them. CloneInvalidateStaleSize now expects the read of the clone target to wait for the clone's write and use its size, rather than be dropped as a hole. Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
f02fb75 to
0bf4908
Compare
|
Rebased onto current main (head 0bf4908), trivial rebase: main gained a new test (from #72290) at the same place in src/test/osd/TestECFailoverWithPeering.cc where one of these commits adds its own, so I kept both blocks; no code was changed to resolve it. |
Stacked on #72683, which is stacked on #72666; only the last six commits are new to this PR. Tracker: https://tracker.ceph.com/issues/81754.
These are the tests for the Fast EC extent cache defects fixed in #72683. They combine the tests from #72566 and #72332, which this PR supersedes, with new tests for the remaining cases.
Commits:
PrimaryLogPG::on_change()does.TestECRollbackPartialWrites: partial-page writes queued behind a rollback, with every byte checked and the object scrubbed.ECExtentCache.HoleErasedByOlderOpLineDeathandHoleErasedBeforeReadDoneSendReads(unittest_extent_cache), andTestECFailoverWithPeering.ExtentCacheGrowthHoleErasedByLineDeath.TestECInvalidateReplay(unittest_ecfailover_with_peering). Another object's RMW read is held at the head of the extent cache queue, so an invalidating op and the writes queued behind it are replayed together. Each test checks every byte and scrubs the object. The invalidating ops are:CloneInvalidateStaleSize,TruncateGrowWithSuspendedReadsandRollbackInvalidateRealistic, disabled by osd: revert #70377 "Set projected_size to current_size on cache invalidate." #72666.CloneInvalidateStaleSizenow checks that the read of the clone target waits for the clone and is then sent for the clone's size.Results on main with #70377 reverted, without and with #72683:
TestECInvalidateReplay.Rollbackceph_assert(reads_sent)TestECInvalidateReplay.CachedRollbackTestECInvalidateReplay.TruncateGrowTestECInvalidateReplay.CachedRecreateTestECInvalidateReplay.RecreateTestECInvalidateReplay.TruncateGrowShortShardTestECInvalidateReplay.UnalignedTruncate(control)TestECRollbackPartialWrites.*(4 tests; 3 zero-fill with #70377)TestECFailoverWithPeering.ExtentCacheGrowthHoleErasedByLineDeathECExtentCache.HoleErasedByOlderOpLineDeath,HoleErasedBeforeReadDoneSendReadsECExtentCache.CloneInvalidateStaleSizeTestBackendBasics.TruncateGrowWithSuspendedReads,RollbackInvalidateRealisticWith #72683 and this PR merged into main, all of
unittest_ecfailover_with_peering(338),unittest_backend_basics(888),unittest_extent_cache(12),unittest_ecbackend,unittest_ec_with_crush,unittest_ec_transaction,unittest_ecutil,unittest_ec_omap_journaland the_lvariants pass. The new and rollback tests passed 600/600 over 5 repeats. Locally, the ctest unit tests pass (218/219:run-cli-testsfails only onradosgw-admin/help.t, as RGW was not built), as dosmoke.sh,safe-to-destroy.sh,crush_weights.shandrun-rbd-unit-tests-*.Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.
🤖 Generated with Claude Code