Closed
Bug 373492
Opened 18 years ago
Closed 18 years ago
Data in data/mining/* is corrupted
Categories
(Bugzilla :: Reporting/Charting, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
(Keywords: dataloss, regression)
Attachments
(1 file, 1 obsolete file)
914 bytes,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
There is a bug in collectstats.pl due to bug 94534 which corrupts all data in data/mining/* files.
When collectstats.pl checks whether it has to recreate files or not, it calls diff_arrays(\@columns, \@new_cols) where @columns is the current list of statuses and resolutions, and @new_cols contains the new list (as you can now custom resolutions). The idea is to check if you had e.g. FIXED|INVALID|WONTFIX and now you have INVALID|WONTFIX|FIXED, in which case you would have to shift columns to match the new order. The problem is that diff_arrays() is insensitive to the order of elements in @columns and @new_cols and so collectstats.pl doesn't see that columns may now be in a different order and will happily appends new stats to data/mining/* files without realizing it puts data out of order (or to be more exact: in an order which doesn't match the old hardcoded one).
2.23.3, 2.23.4 and 3.0 RC1 are all affected. 2.23.2 and older are not.
Flags: blocking3.0+
Updated•18 years ago
|
Summary: Data in data/mining/* are corrupted → Data in data/mining/* is corrupted
![]() |
Assignee | |
Comment 1•18 years ago
|
||
Any other reviewer can review it too.
Attachment #258149 -
Flags: review?(wicked+bz)
Attachment #258149 -
Flags: review?(mkanat)
Comment 2•18 years ago
|
||
Comment on attachment 258149 [details] [diff] [review]
patch, v1
>+ for ($[ .. scalar(@columns) -1 + $[) {
Whoa! What is that crazy syntax? Nobody will have any idea what that means. *I* have no idea what it means. :-) Can we just use a normal for loop?
Attachment #258149 -
Flags: review?(mkanat) → review-
Updated•18 years ago
|
Attachment #258149 -
Flags: review?(wicked+bz)
![]() |
Assignee | |
Comment 3•18 years ago
|
||
(In reply to comment #2)
>+ for ($[ .. scalar(@columns) -1 + $[) {
$[ is the index of the first element of arrays (is 0 by default, but could be 1 as well). Said otherwise, I wrote: for (0 .. scalar(@columns) -1). Is that clearer?
![]() |
Assignee | |
Comment 4•18 years ago
|
||
Attachment #258149 -
Attachment is obsolete: true
Attachment #258231 -
Flags: review?(mkanat)
Comment 5•18 years ago
|
||
> $[ is the index of the first element of arrays (is 0 by default, but could be 1
> as well).
I think if the Bugzilla development team had a collective brain seizure and decided to switch to 1-based arrays, this would be only one of hundreds of places where the code would need updating :-) So I wouldn't worry about that possibility.
r=gerv, but I'll leave the request in case mkanat wants to look at it again.
Gerv
Comment 6•18 years ago
|
||
Comment on attachment 258231 [details] [diff] [review]
patch, v1.1
Okay, looks good to me.
Attachment #258231 -
Flags: review?(mkanat) → review+
Updated•18 years ago
|
Flags: approval3.0+
Flags: approval+
![]() |
Assignee | |
Comment 7•18 years ago
|
||
tip:
Checking in collectstats.pl;
/cvsroot/mozilla/webtools/bugzilla/collectstats.pl,v <-- collectstats.pl
new revision: 1.59; previous revision: 1.58
done
3.0 RC1:
Checking in collectstats.pl;
/cvsroot/mozilla/webtools/bugzilla/collectstats.pl,v <-- collectstats.pl
new revision: 1.58.2.1; previous revision: 1.58
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•