eBay / eBay/HomeObject

Upgrade: HomeObject Meta Service Consumers should have version defined in its super block.

Open
#283 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
11
Forks
17
Avg merge
4d 5h
Merged PRs (30d)
5

Description

Right now only Shard Meta Blk has version defined (in DataHeader), others seems don't have version defined yet.

Existing consumers:

231         HomeStore::instance()->meta_service().register_handler(
232             _pg_meta_name,
233             [this](homestore::meta_blk* mblk, sisl::byte_view buf, size_t size) {
234                 on_pg_meta_blk_found(std::move(buf), voidptr_cast(mblk));
235             },
236             [this](bool success) { on_pg_meta_blk_recover_completed(success); }, true);
237         HomeStore::instance()->meta_service().read_sub_sb(_pg_meta_name);
238
239         // recover shard
240         HomeStore::instance()->meta_service().register_handler(
241             _shard_meta_name,
242             [this](homestore::meta_blk* mblk, sisl::byte_view buf, size_t size) { on_shard_meta_blk_found(mblk, buf); },  // <<<< already have version defined in DataHeader
243             [this](bool success) { on_shard_meta_blk_recover_completed(success); }, true);
244         HomeStore::instance()->meta_service().read_sub_sb(_shard_meta_name);
245
246         // recover snapshot context
247         HomeStore::instance()->meta_service().register_handler(
248             _snp_ctx_meta_name,
249             [this](meta_blk* mblk, sisl::byte_view buf, size_t size) { on_snp_ctx_meta_blk_found(mblk, buf); },
250             [this](bool success) { on_snp_ctx_meta_blk_recover_completed(success); }, true);
251         HomeStore::instance()->meta_service().read_sub_sb(_snp_ctx_meta_name);
252
253         // recover snapshot transmission progress info
254         HomeStore::instance()->meta_service().register_handler(
255             _snp_rcvr_meta_name,
256             [this](meta_blk* mblk, sisl::byte_view buf, size_t size) { on_snp_rcvr_meta_blk_found(mblk, buf); },
257             [this](bool success) { on_snp_rcvr_meta_blk_recover_completed(success); }, true);
258         HomeStore::instance()->meta_service().read_sub_sb(_snp_rcvr_meta_name);
259
260         HomeStore::instance()->meta_service().register_handler(
261             _snp_rcvr_shard_list_meta_name,
262             [this](meta_blk* mblk, sisl::byte_view buf, size_t size) {
263                 on_snp_rcvr_shard_list_meta_blk_found(mblk, buf);
264             },
265             [this](bool success) { on_snp_rcvr_shard_list_meta_blk_recover_completed(success); }, true);
266         HomeStore::instance()->meta_service().read_sub_sb(_snp_rcvr_shard_list_meta_name);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the HomeStore::instance()->meta_service() consumers shown in the issue, especially register_handler() and read_sub_sb(), and compare them with Shard Meta Blk's version in DataHeader. Update the listed HomeObject meta service consumers so their super blocks define versions, then verify that recovery works consistently for each consumer.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.