Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract get_hs_pg() function for simplicity #257

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Conversation

koujl
Copy link
Contributor

@koujl koujl commented Feb 17, 2025

Extract get_hs_pg()/_get_hs_pg_unlock() functions for simplicity.

@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 44.94382% with 49 lines in your changes missing coverage. Please review.

Project coverage is 62.33%. Comparing base (1746bcc) to head (c79bdc2).
Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/homestore_backend/hs_shard_manager.cpp 45.83% 11 Missing and 2 partials ⚠️
src/lib/homestore_backend/hs_pg_manager.cpp 47.82% 11 Missing and 1 partial ⚠️
...lib/homestore_backend/snapshot_receive_handler.cpp 18.18% 9 Missing ⚠️
src/lib/homestore_backend/hs_blob_manager.cpp 65.21% 7 Missing and 1 partial ⚠️
src/lib/homestore_backend/index_kv.cpp 12.50% 6 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #257      +/-   ##
==========================================
- Coverage   63.15%   62.33%   -0.83%     
==========================================
  Files          32       33       +1     
  Lines        1900     2546     +646     
  Branches      204      307     +103     
==========================================
+ Hits         1200     1587     +387     
- Misses        600      795     +195     
- Partials      100      164      +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@yuwmao yuwmao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

RELEASE_ASSERT(iter != _pg_map.end(), "PG not found");
hs_pg = dynamic_cast< HS_PG* >(iter->second.get());
}
auto hs_pg = get_hs_pg(pg_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RELEASE_ASSERT(hs_pg != nullptr, "pg not found")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed & double-checked.

Copy link
Collaborator

@JacksonYao287 JacksonYao287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@koujl koujl merged commit 37b1f8a into eBay:main Feb 19, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants