-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add multiple chunk test for journal vdev. #358
Conversation
Can you put some description in the PR for what changes were made, how the UT supposed to run (by default by conan build test or it plans to be added in long running, etc)? I would help me review the changes better. |
Looks like logstore ut is failing in CI. |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #358 +/- ##
==========================================
+ Coverage 57.78% 58.30% +0.51%
==========================================
Files 108 107 -1
Lines 9504 9531 +27
Branches 1230 1232 +2
==========================================
+ Hits 5492 5557 +65
+ Misses 3481 3436 -45
- Partials 531 538 +7 ☔ View full report in Codecov by Sentry. |
5fd6087
to
5916a4d
Compare
@@ -63,7 +63,7 @@ class JournalVirtualDev : public VirtualDev { | |||
|
|||
off_t m_data_start_offset{0}; // Start offset of where actual data begin for this vdev | |||
std::atomic< uint64_t > m_write_sz_in_total{0}; // Size will be decreased by truncate and increased by append; | |||
bool m_truncate_done{true}; | |||
bool m_truncate_done{false}; | |||
uint64_t m_reserved_sz{0}; // write size within chunk, used to check chunk boundary; | |||
std::vector< shared< Chunk > > m_journal_chunks; // Chunks part of this journal in order. | |||
uint64_t m_total_size{0}; // Total size of all chunks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at line: 71, m_end_offset is actually being updated after init, right? If so, can you update the comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes its updated in init and during recovery time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you update the comment accordingly at line 71?
Added test cases to test the dynamic chunk creation functionality.
Add log entries and make sure the chunk's are created dynamically.
Truncate and make sure the number of chunks are reduced.
Handle conditions where we add entries and truncate everything . Journal offset should point to the next multiple of chunk size.
Its part of conan build. Long running we are planning to run the existing test_log_store and test_log_dev with larger values. Added comments in the test cases.