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

Bulk Request: Views and Events that have the same timestamp get disordered #5808

Closed
habakuk007 opened this issue Jul 10, 2014 · 2 comments
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@habakuk007
Copy link

We try to use piwik as a backend for desktop application usage trecking.

We often try to track pageviews and events that are occurred in the same second, but where the order of them is relevant.

We import them via a bulk request and noticed that if we look at them e.g. in the Visitor Log they got disordered.

This is the request (action names go from 1 to 10):

   post.Add("requests", {"?idsite=1&url=http://statistics.invalid&action_name=1&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=fgsdf",
                              "?idsite=1&url=http://statistics.invalid&action_name=2&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=sdfw",
                              "?idsite=1&url=http://statistics.invalid&action_name=3&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=6546",
                              "?idsite=1&url=http://statistics.invalid&action_name=4&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=dfg",
                              "?idsite=1&url=http://statistics.invalid&action_name=5&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=875",
                              "?idsite=1&url=http://statistics.invalid&action_name=6&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=23fg",
                              "?idsite=1&url=http://statistics.invalid&action_name=7&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=9789fgbhdf",
                              "?idsite=1&url=http://statistics.invalid&action_name=8&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=5435g",
                              "?idsite=1&url=http://statistics.invalid&action_name=9&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=45345dfg",
                              "?idsite=1&url=http://statistics.invalid&action_name=10&rec=1&cdt=2014-07-09+11%3a26%3a10&rand=789bjuik6"})

This is the result in Visitor Log:

10 Actions - 1s

    7    http://statistics.invalid
    8    http://statistics.invalid
    9    http://statistics.invalid
    10    http://statistics.invalid
    6    http://statistics.invalid
    5    http://statistics.invalid
    2    http://statistics.invalid
    3    http://statistics.invalid
    4    http://statistics.invalid
    1    http://statistics.invalid

2014-07-10 10_53_45-usagetest - piwik web analytics reports

@mattab mattab added the Bug label Aug 3, 2014
@mattab mattab added this to the Short term milestone Aug 3, 2014
@mattab
Copy link
Member

mattab commented Dec 18, 2014

@tsteur maybe this issue was fixed by your recent refactor? If not, maybe it would be easy to fix?

@tsteur
Copy link
Member

tsteur commented Dec 19, 2014

I don't think this was fixed by any recent refactoring. If bulk tracking is actually used in this case then the tracker should not really be a problem I think. Maybe it is a bug in reading the visitor details. I think those actions are ordered by server_time and if they all have the same time, which is likely when using bulk tracking, then those entries might be ordered kinda randomly / differently depending on the version of the database etc.?

Edit: I can reproduce this via bulk tracking and they are recorded in the correct order but as expected reading the logs seems to be the problem (all having same server_time)

Edit 2: The sorting is done in PHP on top so there seems to be the problem

tsteur added a commit that referenced this issue Dec 19, 2014
@tsteur tsteur self-assigned this Dec 21, 2014
@tsteur tsteur closed this as completed Dec 21, 2014
@tsteur tsteur modified the milestones: Piwik 2.10.0 , Short term Dec 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants