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

Avoid repeated calls of NewIterator which might be slow (#718 & #722) #720

Merged
merged 2 commits into from
Aug 22, 2019

Conversation

zier-one
Copy link
Contributor

@zier-one zier-one commented Aug 20, 2019

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 in goleveldb spend too much time.

What is changed and how it works?

cherry-pick #718 and #722

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to update the tidb-ansible repository
  • Need to be included in the release note

@july2993
Copy link
Contributor

/run-all-tests

Copy link
Contributor

@july2993 july2993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zier-one
Copy link
Contributor Author

/run-all-tests

1 similar comment
@zier-one
Copy link
Contributor Author

/run-all-tests

@july2993
Copy link
Contributor

/run-all-tests tidb=release-2.1 tikv=release-2.1 pd=release-2.1

@zier-one zier-one changed the title Avoid repeated called of NewIterator which might be slow (#718) Avoid repeated called of NewIterator which might be slow (#718 & #723) Aug 22, 2019
@zier-one zier-one changed the title Avoid repeated called of NewIterator which might be slow (#718 & #723) Avoid repeated called of NewIterator which might be slow (#718 & #722) Aug 22, 2019
@suzaku suzaku changed the title Avoid repeated called of NewIterator which might be slow (#718 & #722) Avoid repeated calls of NewIterator which might be slow (#718 & #722) Aug 22, 2019
suzaku
suzaku previously approved these changes Aug 22, 2019
Copy link
Contributor

@suzaku suzaku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zier-one
Copy link
Contributor Author

/run-all-tests tidb=release-2.1 tikv=release-2.1 pd=release-2.1

@zier-one zier-one merged commit cbaa208 into pingcap:release-2.1 Aug 22, 2019
@zier-one zier-one deleted the cp-2.1 branch August 22, 2019 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants