Changing parameters can silently fail (particularly on Windows)

RESOLVED FIXED in Bugzilla 2.22

Status

()

task
P1
normal
RESOLVED FIXED
13 years ago
11 years ago

People

(Reporter: karl, Assigned: mkanat)

Tracking

2.23
Bugzilla 2.22
Bug Flags:
approval +
approval3.2 +
approval3.0 +
approval2.22 +

Details

Attachments

(1 attachment)

Reporter

Description

13 years ago
In bug 347706, I reported a bug that I discovered when I tried to change parameters, but the parameter change did not complete.  Unfortunately, the failure was silent.

I would guess that this is due to the fact that the rename function in Perl "...varies wildly depending on your system implementation.... Other restrictions include whether it works on directories, open files, or preexisting files."

The only fix I can think of is to supplement the check of rename's return value with a check to see if the file still exists under its original name.
Assignee

Comment 1

11 years ago
This is the most-common problem reported by Windows users, even though they don't know it. The problem is that the user their webserver is running as doesn't have permissions to fully control the data/ folder, and so it either can't create a new file or it can't move the new file over the params file.
Assignee: administration → mkanat
Priority: -- → P1
Target Milestone: --- → Bugzilla 4.0
Assignee

Updated

11 years ago
Summary: Change in parameters can silently fail → Changing parameters can silently fail (particularly on Windows)
Assignee

Comment 2

11 years ago
Posted patch v1Splinter Review
This is great. Our most-common support issue turns out to be a one-line error involving precedence.
Attachment #354410 - Flags: review?(justdave)
Assignee

Comment 3

11 years ago
This is such a simple fix for such high gain, we might as well backport it as far as reasonable.
Target Milestone: Bugzilla 4.0 → Bugzilla 2.22
Attachment #354410 - Flags: review?(justdave) → review+
Comment on attachment 354410 [details] [diff] [review]
v1

wow. :)  backport++ on this :)
Assignee

Updated

11 years ago
Flags: approval3.2+
Flags: approval3.0+
Flags: approval2.22+
Flags: approval+
Assignee

Comment 5

11 years ago
Okay, it required a slight adjustment to apply on 2.22, but otherwise all branches took the above patch exactly.

tip:

Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.76; previous revision: 1.75
done

3.2:

Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.74.2.1; previous revision: 1.74
done

3.0:

Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.70.2.2; previous revision: 1.70.2.1
done

2.22:

Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.51.2.18; previous revision: 1.51.2.17
done
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.