Hello Jean-Paul,

On 6/26/2010 7:46 PM, Jean-Paul Calderone wrote:
On Jun 26, 9:46 am, Jean-Paul Calderone<[email protected]>
wrote:
Hi all,

Last night my trac project stopped noticing new repository revisions.
The log file has plenty of messages like this:

     2010-06-26 09:22:23,699 Trac[cache] INFO: repos rev [29380] !=
cached rev [29376]

However nothing seems to be actually doing the work to update the
cache anymore.  The log level is configured to DEBUG and I don't see
anything else in the log file that might be related to the problem.
What's going on?

I added some additional debug logging to the code responsible for
updating the cache.  This pointed out that the cache was not being
updated because the database gave the appearance of "obviously" being
operated on by a resync job, though this was not the case.

It seems that the revision table and the node_changed table got out of
sync, so that there was a revision (29377) in the revision table but
no corresponding (or subsequent) revision in node_changed.  I don't
know how or why this happened, but it seems like the kind of thing
that would happen if the code was not using transactions correctly and
the server abruptly stopped (which it was not, as far as I can tell)
or lost its connection to the postgresql server (which doesn't seem to
be an event that gets logged, so I have no idea about this).


Nice tracking down of the problem. Yes, this is not the first time we've been seeing reports like this one. If the database backend doesn't support transactions, this situation is indeed prone to happen. See http://trac.edgewall.org/ticket/8067 for example (MySQL - ISAM). But when this concerns PostgreSQL, this is indeed puzzling (same ticket, comment:9 and 10). Lacking a better idea, we should perhaps try to make the resync algorithm able to detect and handle this inconsistent state that shouldn't but do happen.

-- Christian



--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to