-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[ENH] Document magic constants throughout wal3/rust code #4778
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
|
Make Magic Constants Configurable and Document Their Use in wal3/rust-log-service This PR audits all hardcoded magic constants throughout the wal3 and rust-log-service codebase, replacing several with configurable fields in the LogServerConfig struct. Previously hardcoded batch sizes, retry counts, timeouts, and similar values are now controlled via configuration options with sensible defaults. Some remaining magic constants are explicitly commented for future consideration, and a minor logic improvement ensures that time-related errors are handled more descriptively. Key Changes: Affected Areas: This summary was automatically generated by @propel-code-bot |
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.
Should leave a ticket to justify the magical constants or make them configurable
9696333
to
4c1a075
Compare
eff4ca6
to
690f80f
Compare
Description of changes
This PR documents the remaining magic constants throughout the
wal3/rust-log-service codebase. The constants are generally OK, but
some probably deserve configuration.
This also catches a case where initial_insertion_epoch_us would only
move forward, and adds a descriptive error message to the case where
time moves backwards.
Test plan
CI, but it's mostly comments.
Documentation Changes
N/A