Repository navigation
osd/ECBackend.cc: Fix double increment of num_shards_repaired stat - #58139
Conversation
Commit ceph@deffa82 refactored ECBackend::handle_recovery_push for Crimson but accidentally duplicated the code that increments the num_shards_repaired OSD statistic. This caused one of the QA tests to fail because the stat reported twice as much repair work had been completed than expected: qa/standalone/scrub/osd-scrub-repair.sh: TEST_repair_stats_ec: test 26 = 13 Fixes: https://tracker.ceph.com/issues/64437 Signed-off-by: Bill Scales <[email protected]>
| int r = store->stat(ch, ghobject_t(op.soid, ghobject_t::NO_GEN, | ||
| get_parent()->whoami_shard().shard), &st); | ||
| if (r == 0) { | ||
| get_parent()->pg_sub_local_num_bytes(st.st_size); |
There was a problem hiding this comment.
Oh, handling of pg_sub_local_num_bytes & co has been dissected but I missed inc_osd_stat_repaired. Thanks for nailing this down!
|
great! I'll reinstate the test once this fix is merged. |
|
This will get in the next main batch. Thx @bill-scales ! |
|
make check failure is unrelated https://tracker.ceph.com/issues/66556, re-triggering it |
|
jenkins test make check |
|
Analysis of test failures: make check X86 tests failed due to race hazard in unittest_rocksdb_option / TestRocksdbOptionParse.cc
make check X86 tests failed with an instance of existing issue https://tracker.ceph.com/issues/66556
make check ARM tests failed with an instance of existing issue https://tracker.ceph.com/issues/46875
None of these are related to the code change |
|
jenkins test make check |
|
Another unrelated test failure from run_rbd_unit_tests_109.sh (https://jenkins.ceph.com/job/ceph-pull-requests/137260/testReport/junit/projectroot.src/test/run_rbd_unit_tests_109_sh/) This test isn't anything related to the code change, and passed previously so must be another race hazard :-( I think -9 is EBADF which means the image name already exists? I'll investigate further but meanwhile lets have another go |
|
jenkins test make check |
Commit deffa82 refactored ECBackend::handle_recovery_push for Crimson but accidentally duplicated the code that increments the num_shards_repaired OSD statistic.
This caused one of the QA tests to fail because the stat reported twice as much repair work had been completed than expected:
qa/standalone/scrub/osd-scrub-repair.sh: TEST_repair_stats_ec: test 26 = 13
Running the standalone test without the fix reproduces the error every time. Running the standalone test with this fix passes.
It is clear from reviewing the commit above that the intent was to keep the code the same and just split the function ECBackend::handle_recovery_push into two functions - one that has code that will be common with Crimson and one that has the remainder of the code, however the increment of the statistic was left in both functions.
Fixes: https://tracker.ceph.com/issues/64437
Signed-off-by: Bill Scales [email protected]
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 retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e