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

Add multiple chunk test for journal vdev. #358

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

sanebay
Copy link
Contributor

@sanebay sanebay commented Mar 20, 2024

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.

@sanebay sanebay linked an issue Mar 20, 2024 that may be closed by this pull request
@yamingk
Copy link
Contributor

yamingk commented Apr 2, 2024

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.

@yamingk
Copy link
Contributor

yamingk commented Apr 2, 2024

Looks like logstore ut is failing in CI.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 91.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 58.30%. Comparing base (485e656) to head (1f414b1).

Files Patch % Lines
src/lib/device/journal_vdev.cpp 87.50% 1 Missing ⚠️

❗ 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.
📢 Have feedback on the report? Share it here.

@sanebay sanebay force-pushed the logdev_ut branch 2 times, most recently from 5fd6087 to 5916a4d Compare April 11, 2024 18:54
@@ -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.
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

@sanebay sanebay merged commit ed5b061 into eBay:master Apr 12, 2024
21 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.

Add more UT's for log store and journal vdev
3 participants