mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #26638
[Bug 1450680] [NEW] Need better log_debug output from lib/db/upgrade.php
Public bug reported:
One of the most annoying things about db locking up during upgrade is
you don't know where abouts in the upgrade you are - because it doesn't
error out.
It would be most useful if there was:
1) At least a log_debug line at the start of every if version block -
there are often comments there so just turn them into log_debug()
comments.
2) Every time we loop over a bunch of results we should have a loop counter, so upgrader knows things are still running eg:
if ($results) {
$count = 0;
$limit = 1000; // where limit is some appropriate number
$total = count($results);
foreach ($results as $result) {
... the purpose happens here ...
$count++;
if (($count % $limit) == 0 || $count == $total) {
log_debug("$count/$total");
set_time_limit(30);
}
}
** Affects: mahara
Importance: Undecided
Status: Confirmed
** Changed in: mahara
Status: New => Confirmed
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1450680
Title:
Need better log_debug output from lib/db/upgrade.php
Status in Mahara ePortfolio:
Confirmed
Bug description:
One of the most annoying things about db locking up during upgrade is
you don't know where abouts in the upgrade you are - because it
doesn't error out.
It would be most useful if there was:
1) At least a log_debug line at the start of every if version block -
there are often comments there so just turn them into log_debug()
comments.
2) Every time we loop over a bunch of results we should have a loop counter, so upgrader knows things are still running eg:
if ($results) {
$count = 0;
$limit = 1000; // where limit is some appropriate number
$total = count($results);
foreach ($results as $result) {
... the purpose happens here ...
$count++;
if (($count % $limit) == 0 || $count == $total) {
log_debug("$count/$total");
set_time_limit(30);
}
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1450680/+subscriptions
Follow ups
-
[Bug 1450680] Re: Need better log_debug output from lib/db/upgrade.php
From: Robert Lyon, 2016-11-06
-
[Bug 1450680] Re: Need better log_debug output from lib/db/upgrade.php
From: Aaron Wells, 2015-10-23
-
[Bug 1450680] Re: Need better log_debug output from lib/db/upgrade.php
From: Aaron Wells, 2015-05-05
-
[Bug 1450680] Re: Need better log_debug output from lib/db/upgrade.php
From: Robert Lyon, 2015-05-04
-
[Bug 1450680] Re: Need better log_debug output from lib/db/upgrade.php
From: Aaron Wells, 2015-05-04
-
[Bug 1450680] A change has been merged
From: Mahara Bot, 2015-05-03
-
[Bug 1450680] Re: Need better log_debug output from lib/db/upgrade.php
From: Robert Lyon, 2015-05-02
-
[Bug 1450680] A patch has been submitted for review
From: Mahara Bot, 2015-05-01
-
[Bug 1450680] Re: Need better log_debug output from lib/db/upgrade.php
From: Aaron Wells, 2015-05-01
-
[Bug 1450680] Re: Need better log_debug output from lib/db/upgrade.php
From: Robert Lyon, 2015-05-01
-
[Bug 1450680] Re: Need better log_debug output from lib/db/upgrade.php
From: Aaron Wells, 2015-05-01
-
[Bug 1450680] [NEW] Need better log_debug output from lib/db/upgrade.php
From: Robert Lyon, 2015-05-01
References