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

[backend] remove organization cache (#8806) #8959

Merged
merged 5 commits into from
Nov 29, 2024
Merged

[backend] remove organization cache (#8806) #8959

merged 5 commits into from
Nov 29, 2024

Conversation

SouadHadjiat
Copy link
Member

@SouadHadjiat SouadHadjiat commented Nov 8, 2024

Proposed changes

  • remove organizations cache : it was only used for history manager to resolve granted_refs, now we publish granted_refs_ids in the stream (with organizations internal ids) and we'll resolve by querying elastic for older stream events. Organization cache causing some performance issues : if the number of organizations is large, and for cache refresh.

Related issues

Not sure it will fix this issue, since it's not easy to reproduce :

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 90.24390% with 4 lines in your changes missing coverage. Please review.

Project coverage is 65.88%. Comparing base (62f648c) to head (262a669).
Report is 22 commits behind head on master.

Files with missing lines Patch % Lines
...form/opencti-graphql/src/manager/historyManager.ts 90.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8959      +/-   ##
==========================================
+ Coverage   64.96%   65.88%   +0.91%     
==========================================
  Files         623      624       +1     
  Lines       59496    59689     +193     
  Branches     6575     7194     +619     
==========================================
+ Hits        38651    39324     +673     
+ Misses      20845    20365     -480     

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

@SouadHadjiat SouadHadjiat force-pushed the issue/8806 branch 2 times, most recently from 8a5b006 to 385b8eb Compare November 14, 2024 08:54
@SouadHadjiat SouadHadjiat marked this pull request as ready for review November 19, 2024 13:52
@SouadHadjiat SouadHadjiat added the filigran team use to identify PR from the Filigran team label Nov 19, 2024
Copy link
Member

@marieflorescontact marieflorescontact left a comment

Choose a reason for hiding this comment

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

tested locally: history without granted_ref_ids doesn't work
{FB7132F8-5B05-4A82-9D34-2347F833A00A}

@SouadHadjiat SouadHadjiat marked this pull request as draft November 25, 2024 16:13
@SouadHadjiat SouadHadjiat marked this pull request as ready for review November 27, 2024 15:25
@SouadHadjiat
Copy link
Member Author

tested locally: history without granted_ref_ids doesn't work {FB7132F8-5B05-4A82-9D34-2347F833A00A}

This is fixed now, and a test has been added

Copy link
Member

@marieflorescontact marieflorescontact left a comment

Choose a reason for hiding this comment

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

locally tested ok 👌

@SouadHadjiat SouadHadjiat merged commit 31beabd into master Nov 29, 2024
6 checks passed
@SouadHadjiat SouadHadjiat deleted the issue/8806 branch November 29, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants