Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of ceph scrub processing flow

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you the example analysis of ceph scrub processing process, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

PG::sched_scrub () / PG::_finish_recovery ()

| | _ PG::queue_scrub () |

| | _ state_set (PG_STATE_SCRUBBING) |

| | _ PG::requeue_scrub () |

| | _ OSD::queue_for_scrub () |

| | _ OSD::op_wq.queue () |

PGQueueable::RunVis::operator () (PGScrub)

| | _ PG::scrub () |

| | _ PG::chunky_scrub () |

| | _ _ scrubber.state = initial state of INACTIVE |

| | _ scrubber.epoch_start = info.history.same_interval_since |

| | _ scrubber.state = NEW_CHUNK |

| | _ _ initialize primary_scrubmap and received_maps data structures (used to store scrubmap information of primary and replicas, respectively) |

| | _ _ PGBackend::objects_list_partial () reads the specified number of objects |

| | _ _ traverse the actingbackfill queue and call PG::_request_scrub_map () |

| | _ _ create MOSDRepScrub message object |

| | _ _ OSD::send_message_osd_cluster () sends the MOSDRepScrub message object to the OSDs in the actingbackfill queue |

| | _ scrubber.state = WAIT_PUSHES |

| | _ _ wait for all replicas to send scrub information back to primary, and then set scrubber.state = WAIT_LAST_UPDATE |

| | _ _ for last_update_applied > = scrubber.subset_last_update, set scrubber.state = BUILD_MAP |

| | _ PG::build_scrub_map_chunk () |

| | _ PGBackend::objects_list_range () |

| | _ PGBackend::be_scan_list () |

| | _ _ read the object size information |

| | _ _ read the attribute information of the object |

| | _ _ for those requiring deep scrub, read the object itself and the object property itself, and then calculate the corresponding digest value |

| | _ PG::_scan_rollback_obs () |

| | _ PG::_scan_snaps () |

| | _ _ set scrubber.state = WAIT_REPLICAS |

| | _ _ wait for all replicas to return scrub information, then set scrubber.state = COMPARE_MAPS |

| | _ PG::scrub_compare_maps () |

| | _ PGBackend::be_compare_scrubmaps () |

| | _ PG::_scrub () |

| | _ _ set scrubber.state = WAIT_DIGEST_UPDATE |

| | _ _ after completing the scrub operation for all PG to be scrub, set scrubber.state = FINISH |

| | _ PG::scrub_finish () |

| | _ ReplicatedPG::_scrub_finish () |

The processing flow after Replicas receives the MOSDRepScrub message

ReplicatePG::do_request ()

| | _ PG::replicas_scrub () |

| | _ PG::build_scrub_map_chunk () |

| | _ _ create a MOSDSubOp message object and set the message op = CEPH_OSD_OP_SCRUB_MAP |

| | _ OSD::send_message_osd_cluster () |

The processing flow after Primary receives the MOSDSubOp message

ReplicatedPG::do_sub_op ()

| | _ PG::sub_op_scrub_map () |

| | _ _ write the scrubmap of the received replicas to the scrubber.received_maps |

| | _ _ if scrubmap is returned for all replicas, call the PG::requeue_scrub () function to re-enter the scrub operation |

The above is all the contents of the article "sample Analysis of ceph scrub processing flow". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report