-
Notifications
You must be signed in to change notification settings - Fork 188
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
Optimize /etc/hosts writes #259
Conversation
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.
Overall this looks good, thanks for picking it up!
This will be a welcome change reducing the churn in system diff files and incremental backups. I have a few pretty "still" system setups where little or nothing changes in |
There's also a separate issue I want to look into, where repeated calls to |
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.
Thanks for picking this up! This would be a nice addition.
Functionality-wise the current version looks good (modulo one stale debug log + a suggestion to tweak the other logging). But I've added a comment that suggest doing the comparison at a slightly different level, curious what you'd think.
1ef71a4
to
79e692b
Compare
b10685c
to
52384ef
Compare
This change makes the innernet section of /etc/hosts always ordered and deterministic. We can take advantage of that to avoid writes, that will be done in another commit.
This commit also makes the logs print accordingly to the new behavior.
52384ef
to
ca58977
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.
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.
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.
Perfect! Added one last nit, but approved already. Thanks for all the iterations.
Before merging I'll give this some testing in the coming days.
Thank you all for the thoughtful reviews and suggestions 😊 |
Just quickly tested, works well for me, merging. |
The commit messages and issue should provide enough context for the PR 😉
Solves #233