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 a Leak in Synonym - [MOD-6490] #4355

Merged
merged 3 commits into from Jan 15, 2024
Merged

Fix a Leak in Synonym - [MOD-6490] #4355

merged 3 commits into from Jan 15, 2024

Conversation

GuyAv46
Copy link
Collaborator

@GuyAv46 GuyAv46 commented Jan 15, 2024

Describe the changes in the pull request

  1. Allocate newId after checking if the term-id pair already exists (and only if not)
  2. Fix the TermData_IdExists comparison function

This bug could cause a performance hit (searching for a word from a synonym group will yield a union of the same group multiple times)

Main objects this PR modified

  1. synonym map

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

@GuyAv46 GuyAv46 marked this pull request as ready for review January 15, 2024 15:25
@GuyAv46 GuyAv46 changed the title Fix a Leak in Synonim Fix a Leak in Synonym Jan 15, 2024
Copy link

codecov bot commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f398bb5) 84.37% compared to head (8980a04) 84.37%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4355   +/-   ##
=======================================
  Coverage   84.37%   84.37%           
=======================================
  Files         192      192           
  Lines       33451    33451           
=======================================
  Hits        28223    28223           
  Misses       5228     5228           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GuyAv46 GuyAv46 changed the title Fix a Leak in Synonym Fix a Leak in Synonym - [MOD-6490] Jan 15, 2024
@GuyAv46 GuyAv46 added this pull request to the merge queue Jan 15, 2024
Merged via the queue into master with commit 99a271d Jan 15, 2024
11 checks passed
@GuyAv46 GuyAv46 deleted the guyav-fix_synonym_leak branch January 15, 2024 18:35
Copy link

Backport failed for 2.8, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.8
git worktree add -d .worktree/backport-4355-to-2.8 origin/2.8
cd .worktree/backport-4355-to-2.8
git switch --create backport-4355-to-2.8
git cherry-pick -x 3706035e27d7c609351899ea6be7746887f053a8 29f63b8df93f4106c08ad8139f4fb9af9a4f80fc 8980a04c2bb7570cc8feba739ac166ecd0ec2302

Copy link

Backport failed for 2.6, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.6
git worktree add -d .worktree/backport-4355-to-2.6 origin/2.6
cd .worktree/backport-4355-to-2.6
git switch --create backport-4355-to-2.6
git cherry-pick -x 3706035e27d7c609351899ea6be7746887f053a8 29f63b8df93f4106c08ad8139f4fb9af9a4f80fc 8980a04c2bb7570cc8feba739ac166ecd0ec2302

raz-mon pushed a commit that referenced this pull request Mar 6, 2024
* fix leak

* fix `TermData_IdExists` comparing

* added test
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.

None yet

2 participants