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

Fix memory leak for ruby 3.2 #882

Merged
merged 3 commits into from
Apr 20, 2023
Merged

Conversation

konalegi
Copy link
Contributor

@konalegi konalegi commented Apr 19, 2023

After switching to Ruby 3.2 we started to get a memory leak. I don't have any explanation for why it so, it looks like something significant has changed in ruby 3.2 in terms of sigleton_class.eval.

Ruby 3.2 (without fix) (green line) vs ruby 3.0 (orange line) memory consumption graphs
image

after the fix has been applied
image


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the changelog if the new code introduces user-observable changes. See changelog entry format for details.

lib/chewy/index/crutch.rb Outdated Show resolved Hide resolved
lib/chewy/index/crutch.rb Outdated Show resolved Hide resolved
@konalegi konalegi force-pushed the psre-fix-mem-leak-for-ruby-3-2 branch from 01abb3f to 950522d Compare April 20, 2023 06:57
@konalegi konalegi marked this pull request as ready for review April 20, 2023 09:56
@konalegi konalegi merged commit 827591d into master Apr 20, 2023
@konalegi konalegi deleted the psre-fix-mem-leak-for-ruby-3-2 branch April 20, 2023 14:29
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

Successfully merging this pull request may close these issues.

3 participants