-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
lib/model: Sort outgoing index updates by LocalVersion #3411
Conversation
func (s *onDiskIndexSorter) Close() { | ||
l.Debugf("onDiskIndexSorter %p closes", s) | ||
s.db.Close() | ||
os.RemoveAll(s.dir) |
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.
osutil?
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.
👍 fixd
The build failed? |
Build machine oom? |
@st-jenkins retest this please |
@AudriusButkevicius please take another look on this one :) |
@st-review merge |
Purpose
Preparation for delta indexes. To review this part individually and not mix it up unnecessarily with the other changes. Adds some overhead to the initial index exchange, especially if the index is large, but not enough to affect the ManyFiles benchmark negatively in my testing.
Testing
The index sorter is fully covered by unit testing apart from the
panic()
ing lines. I've run the benchmarks and those work, so indexes are being sent.Things to Review
I'm panicing in quite a few places in the sorter as I don't want to add error returns that would anyway be annoying to handle. I think the cases where there are panics are those where we would panic anyway - out of disk space, disk I/O failure, unable to marshal a struct, and so on. But I would appreciate an extra eye on it.