Repository navigation
osd: PGLog Attach correct version to missing list when ignoring log entries - #67870
Conversation
|
Note: Bug reproducer is in tracker |
bill-scales
left a comment
There was a problem hiding this comment.
LGTM. Fixes problem found a couple of times in Teuthology and reproduced with error inject script.
It should be pretty easy to recreate the scenario (but not the assert) in TestPeeringState, we should be able to strengthen its checks so that it not only compares that all the shards have the same number of missing objects but also checks they have precisely the same list of missing objects and need versions (which would catch this issue because two shards end up with the same missing objects but different need versions). Will look at doing this in a separate PR once this has merged.
rzarzynski
left a comment
There was a problem hiding this comment.
Now, with the framework for testing PeeringState, it should be possible to unit test this. Let's add.
This commit enhances the EC peering test framework and adds test cases for erasure-coded pool recovery scenarios: NOTE: Many of the tests cases are disabled as they recreate certain problems. Later commits will enable these tests and fix the production issues, but under different PRs. Test Infrastructure Improvements: - Add MockStore wrapper with read error injection capabilities for testing error handling in EC recovery - Enhance ECPeeringTestFixture with recovery callback verification - Add support for pg_upmap to better simulate OSD placement - Implement write_attribute() for testing partial vs full stripe writes - Add read_shard_object_info() to verify on-disk version consistency - Improve logging with missing object stats (m=, u=, mbc=) - Add support for doing object recovery in Fast EC. - Add set_config() helper for runtime configuration changes - Preserve xinfo features when marking OSDs up/down - Fix pg_temp handling for EC pools with optimizations Mock Object Enhancements: - Update MockPGBackendListener with recovery callback tracking - Add on_local_recover, on_peer_recover, on_global_recover tracking - Implement proper stats publishing (pg_stats_publish) - Add is_missing_object() implementation - Enhance should_send_op() with async_recovery_target logic - Add apply_stats() to update PeeringState statistics Test Cases Added: - ECRecoveryTest: Verifies recovery with missing objects after OSD failure - ECSequentialOSDFailoverTest: Tests sequential OSD failure/recovery cycles - MultiObjectRecoveryReadCrash: Reproduces bug #75432 (multi-object reads) - RollbackVersionMismatch: Reproduces bug #76213 (version mismatch) - RollbackAfterMixedBlockedWrites: Reproduces bug #75211 (rollback issues) These tests validate EC recovery mechanisms including: - Object version tracking across shards - Recovery callback invocation (local, peer, global) - Handling of read errors during recovery - Rollback behavior after blocked writes - Multi-object recovery with partial failures Assisted-by: IBM Bob, using Claude Sonnet Signed-off-by: Alex Ainscow <[email protected]>
…ntries A previous fix for PR 66698 fixed an issue where log entries associated with partial writes were being processed incorrectly (see that PR and associated tracker for details). The fix was to ignore log entries that should not have been present on the non-primary shard. The problem with that approach is that in a more complex scenario, where the log contained a partial write, followed by a full write AND the shard is backfilling, then the missing list was being given the version prior to the full write, rather than prior to the clone. Our fix here corrects how the missing list version is calculated. See the associated tracker for instructions on how to recreate Fixes: https://tracker.ceph.com/issues/75211 Signed-off-by: Alex Ainscow <[email protected]>
|
@rzarzynski I have put in the requested test harness. |
|
jenkins test make check arm64 |
A previous fix for PR 66698 fixed an issue where log entries associated with partial writes were being processed incorrectly (see that PR and associated tracker for details). The fix was to ignore log entries that should not have been present on the non-primary shard.
The problem with that approach is that in a more complex scenario, where the log contained a partial write, followed by a full write AND the shard is backfilling, then the missing list was being given the version prior to the full write, rather than prior to the clone.
Our fix here corrects how the missing list version is calculated.
See the associated tracker for instructions on how to recreate
Fixes: https://tracker.ceph.com/issues/75211
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.