-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[TST] More proptest for rust log service #4771
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
[TST] More proptest for rust log service #4771
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
4982437
to
b072e5f
Compare
Expanded Proptest and Bug Fixes for Rust Log Service Testing This PR significantly expands property-based testing (proptest) coverage for the Rust log service, introducing new property tests that exercise additional methods including 'scout_log', 'update_collection_offset', 'roll_dirty_log', 'cached_get_all_collection_info_to_compact', and 'fork_log'. Two comprehensive integration-style tests are added: one verifies correct handling of dirty logs with multiple collections and sequence compactions, and another validates the correctness and isolation of the log forking process. Additionally, a bug fix addresses an issue where the dirty log offset could advance ahead of the enumeration offset, improving correctness of the logging logic. Small adjustments are also made to test and helper function organization, including improvements to Debug impls and test utilities. Key Changes: Affected Areas: Potential Impact: Functionality: System functionality remains unaffected in mainline execution paths, but correctness and resilience of log service is improved via broader test coverage and a bug fix. Performance: No direct impact; changes are limited to test code and a correctness fix in mark_dirty calls. Security: No security implications. Scalability: No scalability concerns; changes are focused on correctness and test coverage. Review Focus: Testing Needed• Run Code Quality Assessmentrust/log-service/src/lib.rs: Test organization improved; helper functions and property tests are logically grouped and maintainable. rust/types/src/record.rs: Debug impl is correct and avoids leaking bulky internal fields; testability improved. rust/wal3/src/writer.rs: The mark_dirty fix corrects record offset handling when updating dirty state. Best PracticesTesting: Bugfix: Code Organization: Potential Issues• Expanded use of proptest may lead to increased test execution time or intermittent test failures in CI if shrinking is not handled robustly. This summary was automatically generated by @propel-code-bot |
Description of changes
Summarize the changes made by this PR.
Improvements & Bug fixes
scout_log
update_collection_offset
roll_dirty_log
cached_get_all_collection_info_to_compact
fork_log
New functionality
Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?