-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH] Tool to inspect the contents of the log. #4757
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This PR introduces a new Rust binary, This summary was automatically generated by @propel-code-bot |
async fn main() { | ||
let args = std::env::args().skip(1).collect::<Vec<_>>(); | ||
if args.len() != 2 { | ||
eprintln!("USAGE: chroma-inspect-log-state [HOST] [COLLECTION_UUID]"); |
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.
[BestPractice]
The error message and command line usage instruction don't match the actual binary name. The error message refers to chroma-inspect-log-state
but the binary is named chroma-inspect-log-contents
.
"{} {} {} {}", | ||
i as usize + j, | ||
record.log_offset, | ||
record.record.as_ref().map(|r| r.operation).unwrap_or(4), |
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.
[BestPractice]
Magic number 4
is used for the default operation. Consider using a named constant or referencing the appropriate enum value to make the code more maintainable and understandable.
Return the keys that are on the log.
ba22817
to
fa5645f
Compare
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.
Remember to update the runbook
Description of changes
Returns the keys that are on the log in order, and the type of log operation.
Test plan
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
N/A