Repository navigation
add missing pg scrub_superblks - #480
JacksonYao287 wants to merge 1 commit into
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## stable/v4.x #480 +/- ##
==============================================
Coverage ? 54.40%
==============================================
Files ? 39
Lines ? 6907
Branches ? 943
==============================================
Hits ? 3758
Misses ? 2742
Partials ? 407 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xiaoxichen
left a comment
There was a problem hiding this comment.
- PG Move will not carry over the pg_scrub_superblock.
- The lifecycle of pg_srcrub_superblock is confusing
- There is a getter
get_scrub_superblkbut no reference - the only reader now
submit_scrub_taskwhich checks sb exists and fails if not - The writer side
save_scrub_superblktried to create a scrub_sb if not present.
- There is a getter
Can we move reader to use get_scrub_superblk and move the create_sb_if_not_presnet into get_scrub_superblk ?
yes, it will just create a new pg_scrub_superblock in the br receiver since local_create_pg will be called there. actually, this comes back to the previous discussion, how to sync pg_scrub_superblock across the pg? the solution is not finalized yet, so I did not consider too much on this point here. the intention of this pr is to make scrubber work normally, so we can trigger scrub through restful api.
1 2 save_scrub_superblk is just like std::map#insert_or_update, |
|
generally lgtm, just curious about: when the PG is destroyed, what will happen on the scrub_superblk? What if SM crashed during PG destory (so after restart the PG sb exist but will remove later) |
I am trying to propose the behavior of [] access to an std::map that if the key doesnt exists, the default constructor is called and returned. UT can be adjusted accordingly. The discussion regarding how to sync We dont need to rushing into v4 as well unless we get an emergent fix again to have 0.5.7.1 |
scrub_super_blk will be destroyed when pg is destroyed , pls see but, this is a good catch. I can put destroy_scrub_superblk into destroy_pg_resource, so that if SM crashed during PG destory, the related scrub_superblk will be destroyed as those pg resource.
IMO, the behavior of how to access scrub_super_blk does not matter too much, since it is not in the critical scrub path. yes, we have no rush in v4. let`s leave this PR here. i have created a new PR for integration test. we can cycle back on this after the integration test is completed, maybe it will be more clear for us on how should we handle this part then. |
this PR only add
add_missing_pg_scrub_superblks