-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Getting wrong reports when choosing date range between years #15363
Comments
@mattab moving this for now out of the backlog. It might be already fixes as part of other issues. And we also have #14123 so could even close it as a duplicate. @KarthikRaja1388 In case you haven't done yet... Could you maybe invalidate the data for that range or week and archive it again? Or select a slightly different range eg 29-12-2019 to 2020-01-04 to see if it happens there as well? I just tested it and could not reproduce it. |
I have the very same problem with the same date range.
I get the same discrepancy with any starting date from Dec 2nd until Dec 30th. Adding Jan 5th gives a lower total than ending on Jan 4th. |
I can actually reproduce it indeed. I was selecting up to the 4th when trying to reproduce it and it was working. But to the 5th it is indeed broken. Basically, there must be some issue with processing that week. |
FYI: For a test I just invalidated the data and then archived again and it was showing the correct number afterwards. I also confirmed through debugging that it is using the right dates when archiving. The number of visits shown for the first week of the new year was some random number. Like it wasn't the sum of 30th+31st or the sum of 1st-5th Jan. Looking at the archive dates it looks like this: So it was not re-archived again in the new year which probably confirms the invalidation issue. |
Indeed, invalidating the data and archiving again fixed the mismatch. Thanks. |
@tsteur / @KarthikRaja1388 can you still reproduce this? Seems to be working now (on the demo, locally and on cloud). |
@diosmosis I tried to reproduce it by setting the date back to Jan 1st (and some other days) and then choosing I suppose to reproduce the issue we'd need to use Matomo 3.12.0 or so and try somehow reproduce it like this:
Then see what happens when selecting the week of Dec 30th to Jan 5th. Possible it's more of an edge case and can be reproduced like this. On Cloud we invalidated all reports back then to repair them. @KarthikRaja1388 do you remember if this was an issue on the cloud or self hosted? This could give us an indication whether we should try and reproduce it with browser archiving enabled or disabled (it is disabled on the cloud). If we can't reproduce it, I wonder if the easiest way be to once invalidate the report of the first week at the beginning of the second week somehow. Like a task that checks if it's the second week and if so, invalidates the previous week once (eg by setting a flag for that year in the option table). Just a thought... |
Hi All, I seem to be having the same issue. Premised environment running 3.13.0. For me it seems the issue is when the week goes across months. For Example: Date Range: Week From 2020-07-27 To 2020-08-02 If I select Custom Range for 2020-07-27 To 2020-08-01 (one day previous), I get 1,661 visits. If I add 2020-08-02 to the range, or use the pre-built Week option for that week, I get 1,407 visits. On 2020-08-02 I have 314 visits. If I include 2020-08-02 in a range like 2020-07-28 to 2020-08-03 (doesn't include a whole week), the sum of the individual days equals the number of visits and everything looks right. If I change the range to 2020-07-26 to 2020-08-03 (includes a whole week and some extra days), the numbers are wrong again. So it appears that the issue may be when calculating a preset range (like "Week"), maybe when the week crosses months? When I select a custom date range that includes a pre-set range like week, I'm assuming the range detects that and uses the pre-archived week. And if that pre-archived week is wrong, all the subsequent calculations that depend on it will also be wrong. I tried to invalidate the archive and re-archive the data but that didn't help. Please let me know if I can do any further troubleshooting. Thanks a lot. -Igor |
@ibril15 I wonder if this is maybe a different case. In the other cases invalidating the data and then rearchiving helped. I've tried to reproduce it for these ranges but it works nicely for me. I wonder if the range was maybe not correctly invalidated. In the original issue the date range is actually a full week and it might be a different problem I think. |
Ok, I've split my comment off into a #16320. Thanks. |
@diosmosis are you still working on this one? @KarthikRaja1388 do you remember if this was an issue on the cloud or self hosted? This could give us an indication whether we should try and reproduce it with browser archiving enabled or disabled (it is disabled on the cloud). I think so far we can't reproduce it and have no idea where something could go possibly go wrong. This issue is incredibly difficult to replicate as we don't know if the issue is related to invalidating or archiving and we always have to set the server time back to our new year and we don't know if the problem happens before or after new year etc. I'm thinking we might otherwise wait until next year to see if the big archive refactoring maybe fixed it. My guess be it's related to invalidating but it's hard to tell. |
@tsteur no, I wasn't able to reproduce. I can try and reproduce by checking out 3.12, but given it's an edge case, unless we see it again I'm not sure if it's worth spending a lot of time on it? |
@diosmosis agreed. I'll move this to RC for now. Instead of finding the root cause what we maybe could do is simply adding an invalidation after the first week after new year so if it happens again it would just rearchive the data. |
If we don't want to apply such a workaround could also move it back to the backlog and see if it happens again around new year. |
@tsteur I don't remember whether it is cloud or On-premise, but from the image attached I can say it is cloud. |
I'll be moving this one out of the Matomo 4 milestone for now as we can't really reproduce it and we'll wait to see if it happens this year again with Matomo 4. |
Thanks for reporting this issue. |
Issue: When viewing a report by choosing a date range between years(ex: Dec 2019 - Jan 2020), the numbers are not adding up right. Evolution graph seems to be having a different number than the numbers shown in the reports
Steps to reproduce:
In the Overview report the visits should be well over 80,000 visits for the chosen period but it's only showing 24,792 visits
Note: Reports works fine if the date range falls in the same year
The text was updated successfully, but these errors were encountered: