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

Prevent possible fatal error when report not found #13892

Merged
merged 1 commit into from Dec 21, 2018
Merged

Prevent possible fatal error when report not found #13892

merged 1 commit into from Dec 21, 2018

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Dec 20, 2018

fix #13883

I've tried to debug locally and reproduce the issue locally as well as on the actual instance but couldn't reproduce it. Seems some race conditions or so. Happens like once a day only. Also didn't quite understand where the deep URL parameter comes from in ?module=API&method=API.getWidgetMetadata&filter_limit=-1&format=JSON&deep=1&idSite=2

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Dec 20, 2018
@tsteur tsteur added this to the 3.8.0 milestone Dec 20, 2018
@diosmosis
Copy link
Member

So I guess it's some kinda weird caching issue?

@diosmosis diosmosis merged commit 94b4c65 into 3.x-dev Dec 21, 2018
@diosmosis diosmosis deleted the 13883 branch December 21, 2018 05:40
tsteur added a commit that referenced this pull request Dec 21, 2018
refs #13883 and #13892

Checking for `$cache->contains($lazyCacheId)` and then `$cache->fetch($lazyCacheId)` can run into race conditions when the cache expires just in between. I reckon this might be the case for #13892 which we see happening like once a day or every other day.

We would possibly also need to check for other usages. Might not actually be an issue cause the transient is used in the lazy cache as well and it should keep the entry during the same request. It could come to this issue though the first time a cache entry is read.
diosmosis pushed a commit that referenced this pull request Jan 22, 2019
refs #13883 and #13892

Checking for `$cache->contains($lazyCacheId)` and then `$cache->fetch($lazyCacheId)` can run into race conditions when the cache expires just in between. I reckon this might be the case for #13892 which we see happening like once a day or every other day.

We would possibly also need to check for other usages. Might not actually be an issue cause the transient is used in the lazy cache as well and it should keep the entry during the same request. It could come to this issue though the first time a cache entry is read.
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 not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fatal error in Goals/Pages.php, report is null
2 participants