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

When 10 widgets request the same site + date + segment at once, check it is archived only once #4918

Closed
tsteur opened this issue Mar 28, 2014 · 2 comments
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Mar 28, 2014

There used to be a lock to ensure that a given archive is only processed once.

When 10 widgets requested the same site + date + segment at once, then this lock ensured that only the first widget processes the data, while other are waiting for the lock to be released (and then will just read the archive data)

Although there used to be this lock, the lock did not really work and was removed therefore, see a0acaac

Basically there was this outer GET_LOCK (that's the lock we are talking about) which was immediately released by an inner GET_LOCK. So the outer lock never really worked. In addition, even if the lock worked, there was no check whether data was already archived or not. So if there were 10 requests at the same time they would have still created 10 archive ids.

Link to MySQL doc: https://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_get-lock

Goal of this ticket is to make it work again.

@tsteur
Copy link
Member Author

tsteur commented Mar 28, 2014

In bc4b29f: refs #4918 remove no longer needed method

@mattab
Copy link
Member

mattab commented Jun 20, 2014

Test procedure:

  • Dropped archive_numeric_2014_06
  • Load dashboard: takes 3 seconds to load all widgets
    • Now add a sleep(20) in Actions/Archiver
  • Dropped archive_numeric_2014_06
  • Load dashboard: takes approx 23 seconds to load all widgets

it just works!

@tsteur tsteur added this to the 2.4.0 - Piwik 2.4.0 milestone Jul 8, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants