Edgewall Software

Opened 11 years ago

Last modified 10 years ago

#11329 closed defect

Configuration file may not be reparsed when successive save operations are called on a low resolution filesystem — at Version 3

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.2
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

As discussed in comment:17:ticket:11069 and comment:13:ticket:11176, the configuration file might not be reparsed when successive save operations are invoked in a time interval less that is less than the resolution of the filesystem.

In #11069 we discussed how to fix the issue for the functional test environment. Changes will be proposed here that intend to fix the issue for a Trac instance running on a low resolution filesystem.

Change History (3)

comment:1 by Ryan J Ollos, 11 years ago

Proposed changes can be found in log:rjollos.git:t11329.

After putting the test cases in place, I encountered failures on EXT4 that could only be avoided by putting a sleep operation of up to 1e-2 between touch / save operations in the test case.

Waiting for the file modification time to change seems like the most general solution that should work on all platforms, regardless of the file timestamp resolution and how small an interval there is between touch or save operations.

comment:2 by Remy Blank, 11 years ago

This solution could lead to multiple environment reloads when saving a configuration, under normal (non-test) operation.

Instead of trying to work around the low timestamp resolution of certain filesystems (and the per-platform differences), how about storing the last change time in a separate file (trac.ini.ts)?

comment:3 by Ryan J Ollos, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.