Skip to content

Issue 44: Create Volume and its recovery#53

Merged
yamingk merged 6 commits intoeBay:mainfrom
yamingk:yk_hb_new
Mar 8, 2025
Merged

Issue 44: Create Volume and its recovery#53
yamingk merged 6 commits intoeBay:mainfrom
yamingk:yk_hb_new

Conversation

@yamingk
Copy link
Collaborator

@yamingk yamingk commented Mar 5, 2025

This PR includes:

  1. Volume creation with solo repl dev.
  2. Write volume meta block and recover volume on reboot.

mutable std::shared_mutex _volume_lock;
std::map< volume_id_t, unique< Volume > > _volume_map;
mutable std::shared_mutex vol_lock_;
std::map< volume_id_t, VolumePtr > vol_map_;
Copy link
Contributor

Choose a reason for hiding this comment

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

unordered map if we dont want volume list in order.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tend to keep using the map for couple of reasons, it (volume map) is inherited from 1.3 and HomeObject is also using map for pg map. Since there will only be tens or less than hundreds of volumes, it think it should be fine and it can provide some ordering access when we introduce the accessibility/visability. We can change it when we see a strong needs.


public:
VolumeIndexValue(homestore::bnodeid_t val) { assert(0); }
VolumeIndexValue(uint32_t val, uint16_t o) : homestore::BtreeIntervalValue(), m_base_val{val}, m_offset{o} {}
Copy link
Contributor

Choose a reason for hiding this comment

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

key is lba and value is pba (BlkId) ?

Copy link
Collaborator Author

@yamingk yamingk Mar 6, 2025

Choose a reason for hiding this comment

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

I haven't thought through this yet and tend to parking lot when the write part comes in. Please feel free to update this.

@codecov-commenter
Copy link

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

Codecov Report

Attention: Patch coverage is 0% with 149 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (6d77f57) to head (f1e8a80).

Files with missing lines Patch % Lines
src/lib/volume/index.hpp 0.00% 72 Missing ⚠️
src/lib/volume/volume.cpp 0.00% 25 Missing ⚠️
src/lib/volume_mgr.cpp 0.00% 19 Missing ⚠️
src/lib/volume/volume.hpp 0.00% 18 Missing ⚠️
src/lib/volume/tests/test_volume.cpp 0.00% 10 Missing ⚠️
src/lib/listener.cpp 0.00% 2 Missing ⚠️
src/include/homeblks/volume_mgr.hpp 0.00% 1 Missing ⚠️
src/lib/common.cpp 0.00% 1 Missing ⚠️
src/lib/homeblks_impl.cpp 0.00% 1 Missing ⚠️

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

Additional details and impacted files
@@          Coverage Diff           @@
##            main     #53    +/-   ##
======================================
  Coverage   0.00%   0.00%            
======================================
  Files          8      14     +6     
  Lines        172     314   +142     
  Branches      11      19     +8     
======================================
- Misses       172     314   +142     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yamingk yamingk merged commit 442ba96 into eBay:main Mar 8, 2025
25 checks passed
@yamingk yamingk linked an issue Mar 10, 2025 that may be closed by this pull request
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.

Create Volume

3 participants