Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IBX-5502: Added additional tag cleaning to limit down number of orphaned tag en… #477
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
base: 4.6
Are you sure you want to change the base?
IBX-5502: Added additional tag cleaning to limit down number of orphaned tag en… #477
Changes from all commits
6e60c00
06b7bce
e6ce8b7
6536532
b501ee2
d597ba7
a71ea65
d46a8f6
e8b66fc
c6eb694
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked the impact of this on performance? Every load inside caching system is a potential risk. I'd like to avoid the situation where we release some memory, but make longer update time as the cost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only in the empirical way. If you have dozens or hundreds of locations, ofc this can have an impact, but then, probably this one is less of your worry then.
Any explanation behind this one? The change is made in a handler, not in the caching system, which to be frank main purpose is to do "loads".
That's, in my opinion is a wrong approach. This helps to clear unevictable memory from Redis - not doing this always results in eventually reaching a point when the whole app crashes. So this is not memory vs longer updates, but making the project less prone to failure due to OOM errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not very readable to me. How about:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, to be honest in my opinion thi is even less readable ;)
But no strong opinion here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given
LOCATION_PATH_IDENTIFIER
tag exists only in conjunction withLOCATION_IDENTIFIER
tag, are you sure both are necessary?Moreover, I don't see
LOCATION_PATH_IDENTIFIER
tags (lp-%s
) in the list off affected by the issue.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the PR's description, the list presented only has an example, and the number of orphaned tags is not limited to it. But if you look really closely, you will also find mention of the
lp-
tag ;)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not invalidate tags for an unrelated versions. The cache performance side effects of that might be difficult to predict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, and I agree. Any suggestionson how we can handle
c-<contentId>-v-<prevVersionNo>
tags?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @alongosz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of all the above comments, maybe...
Have you tried to use:
instead of performing very similar loads to what that callable does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not agree,
getContentTags
should not return location tags.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, let's fix it while at it, because adding new consts like that contradicts the purpose of those consts.
What you need to do is make
ContentHandler
constants used in this block public and either:a) point const value here to those constants in
ContentHandler
b) use directly in this class
ContentHandler
constants.b) is preferred, but maybe a bit out of scope for you. a) is easily achievable.
The point of using a const there is usage search. When I'm searching for
ContentHandler::CONTENT_IDENTIFIER
const, I need to see all places it is used. When done like that that information is lost.