Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #6529 Throw an exception when codebase is older than schema to …
…prevent broken race conditions
- Loading branch information
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
core/Exception/DatabaseSchemaIsNewerThanCodebaseException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Piwik - free/libre analytics platform | ||
* | ||
* @link http://piwik.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
* | ||
*/ | ||
namespace Piwik\Exception; | ||
|
||
class DatabaseSchemaIsNewerThanCodebaseException extends Exception | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c93d3e8
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 was for #6829
c93d3e8
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.
Hi @mattab This error is always irritating, "Your Piwik codebase is running the old version %1$s and we have detected that your Piwik Database has already been upgraded to the newer version Maybe your Piwik administrators are currently finishing the upgrade process. Please try again in a few minutes." because even after one hour, this error does not go away and it seems that the developer is struck with the index page and could not do anything. It would be great if the given codebase version and database version always stay in sync because in that case developer is free to access local piwik site until new (codebase + database) version update is available. I have noticed this error several times. Maybe, we need more sensible and accurate update reporting.
c93d3e8
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 error is only displayed when Piwik runs on an oldcodebase. make sure you update your codebase to run the latest Piwik on all servers
c93d3e8
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 find this also occurs when switching branches, going to old Piwik versions to test, etc. Perhaps it can be disabled when Development mode is enabled?
c93d3e8
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.
Why not, feel free to create issue or PR
c93d3e8
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.
@diosmosis I too talk about exactly the same thing. As Matthieu suggests, we need to create an issue/PR so that this doesn't occur in development when we actively switch branches here and there.
c93d3e8
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.
@saleemkce actually it was done few days ago: 9037275
so this should be fixed now in git master!