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

config.rs compact() does not compact #1116

Closed
sbourdeauducq opened this issue Jul 24, 2018 · 1 comment
Closed

config.rs compact() does not compact #1116

sbourdeauducq opened this issue Jul 24, 2018 · 1 comment
Assignees
Milestone

Comments

@sbourdeauducq
Copy link
Member

from David:

the loop at 184 walks every old entry, and writes out a copy of it at 194. It writes out an updated value, sure, but then you just end up with duplicates of the same value
(so if new_value.len() > old_value.len() it's actually expand :) )
IE, there's no spot where it skips writing an entry if a duplicate were found
https://hastebin.com/zodimilequ.diff should fix it

@sbourdeauducq sbourdeauducq added this to the 3.7 milestone Jul 24, 2018
@sbourdeauducq
Copy link
Member Author

This should also remove all traces of entries that have been removed with remove() - the current patch does not do that.

@whitequark whitequark self-assigned this Aug 1, 2018
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

No branches or pull requests

2 participants