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

slightly improve performance of RocksDB key locking #19159

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

jsteemann
Copy link
Contributor

Scope & Purpose

A small optimization for the key locking in RocksDB:
The existing code did a find(key) followed by an insert(key) if the key was not already locked. This is almost the case. We are now instead doing an unconditional insert(key). The key object is built in any case, as before.
An unscientific test which inserts 10m documents via an AQL query suggests a performance increase of 0.5 to 1%. This is not spectacular but also not bad given the small size and low risk of the change.

  • 💩 Bugfix
  • 🍕 New feature
  • 🔥 Performance improvement
  • 🔨 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++ Unit tests
    • integration tests
    • resilience tests
  • 📖 CHANGELOG entry made
  • 📚 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.11: -
    • Backport for 3.10: -
    • Backport for 3.9: -

Related Information

  • Docs PR:
  • Enterprise PR:
  • GitHub issue / Jira ticket:
  • Design document:

@jsteemann jsteemann added this to the devel milestone Jun 2, 2023
@cla-bot cla-bot bot added the cla-signed label Jun 2, 2023
Copy link
Contributor

@MBkkt MBkkt left a comment

Choose a reason for hiding this comment

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

emplace instead of insert in the rocksdb code?

Copy link
Member

@neunhoef neunhoef left a comment

Choose a reason for hiding this comment

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

LGTM

@jsteemann jsteemann merged commit ad5992f into devel Jun 2, 2023
@jsteemann jsteemann deleted the performance/key-lock-optimization branch June 2, 2023 15:14
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