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

During archive invalidation clear general cache less often #15577

Merged
merged 3 commits into from Feb 17, 2020

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Feb 16, 2020

I know the code is not ideal since everyone who calls forgetRememberedArchivedReportsToInvalidate would need to know to ideally also invalidate the general tracker cache. On the other side we're seeing quite a lot of invalidations like sometimes 50 invalidations within a few ms causing heaps of cache invalidations and cache re-generations across many servers within few ms potentially resulting in locks and temporary performance issues.

Maybe this helps to prevent also things like #15545

@diosmosis maybe you can have a look? Maybe since the code is only used internally it may be fine like that?

@tsteur tsteur added the Needs Review PRs that need a code review label Feb 16, 2020
@tsteur tsteur added this to the 3.13.3 milestone Feb 16, 2020
@tsteur tsteur changed the title While archiving invalidate general cache less often During archive invalidation clear general cache less often Feb 16, 2020
@tsteur tsteur changed the base branch from 4.x-dev to 3.x-dev February 16, 2020 20:52
@diosmosis
Copy link
Member

Looks good to me, some suggestions:

  • We can get rid of the cache clear in getRememberedArchivedReportsOptionFromTracker(). It is cleared again anyway at the end of the method that calls it here:
    Cache::clearCacheGeneral();
    .
  • If it's possible to just change a single entry in the general cache, then we could also get rid of that clear too. But that might not be do-able.

@tsteur
Copy link
Member Author

tsteur commented Feb 16, 2020

@diosmosis removed the other clear cache as well 👍

@diosmosis diosmosis merged commit b4b5e3a into 3.x-dev Feb 17, 2020
@diosmosis diosmosis deleted the invalidarchivecleargeneral branch February 17, 2020 00:35
jonasgrilleres pushed a commit to 1024pix/pix-analytics that referenced this pull request Sep 22, 2020
…g#15577)

* Clear general cache less often during archiving

* add comment

* remove not needed clear cache
jbuget pushed a commit to 1024pix/pix-analytics that referenced this pull request Sep 26, 2020
…g#15577)

* Clear general cache less often during archiving

* add comment

* remove not needed clear cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants