-
Notifications
You must be signed in to change notification settings - Fork 131
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
Avoid repeated called of NewIterator which might be slow #718
Conversation
/run-all-tests |
any more detail about why it will be so slow, will it be relate to because too many key with same will |
what about adding a metrics about deleted keys number?, so we can know the delete speed later from metrics. |
/run-all-tests |
I will go deep into this problem and find the answer to those. |
/run-all-tests |
/run-all-tests |
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.
LGTM
@july2993 PTAL again |
@leoppro You may consider changing the commit message to "Avoid repeated called of NewIterator which might be slow" before merging. |
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.
rest LGTM
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.
LGTM
# Conflicts: # pump/storage/storage.go
# Conflicts: # pump/storage/storage.go
What problem does this PR solve?
When the size of metadata(storage with leveldb) grown very large, pump storage gc will be very slowly. The reason for this bug is the
seek
operation ingoleveldb
spend too much time.What is changed and how it works?
we
seek
only one time on theinit
process of GC, instead ofseek
every time beforevlog gc
.Check List
Tests
Passed