[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Log Caching problem

From: <Stefan.Fuhrmann_at_etas.de>
Date: 2007-06-20 02:03:28 CEST

Tobias Schäfer <tobiasschaefer@gmx.de> wrote:

> I have the same problem: "Show log" results in an endless loop on some
> files if "Log Caching" is enabled. Revision 9810 didn't solve it.

Finally, I was able to reproduce the bug and it should
be fixed in r9821. Since I probably missed the window
for the nightlies, the fix will be available Thursday
morning.

> I've tried debugging the problem, found the loop, but have no idea why
what
> is going wrong.

Warning: Technical description follows.
This is not for the faint of heart ;)

For large repositories, log information for a given
path tends to be sparse, especially if you are in for
"software archeology". Therefore, just fetching everything
on the root folder and filtering afterwards is not an
option.

When we receive a log, we mark the "gaps" as "skip range",
i.e. "there will be no log info for this path and in that
revision range, hence ignore it".

When the query crawls the log cache, it will stop as
soon as it comes across a revision that has not been
cached, yet. If there is skip range that says that this
revision can be safely ignored for this path, then the
iterator object will continue with the first revision
previous to the respective skip range. Otherwise, the
missing data will be requested from the repository server.

As a result, the whole range covered by the server response
must be "iteratable" afterwards. If that is not the case,
another request is made. Since the response will be the
same, no further information will be stored -> indefinite loop.

The problem is that skip ranges can only be stored for
paths that have shown up in the change lists. If there
were no changes for this path (e.g. file on this branch),
we cannot record the skip range(s). Example:

rev2: A \trunk\foo.txt
rev3: A \branches\b from \trunk @2
rev4: A \branches\b\bar.txt
rev5: A \branches\c from \branches\b @4

execute: log \branches\c\foo.txt -r HEAD:1

Known paths (after receiving log info @rev):

r5: \
r5: \branches
r5: \branches\c
r5: \branches\b

r3: \trunk

-> cannot mark the gap (r4,length=1) for \branches\c\foo.txt
-> server gets asked for \branches\b\foo.txt @4 over and over again

In that case, we must fill the gap by requesting the log
for the next known (cached) parent path (here: \branches\b).

Maybe, may explanations can help other to debug the log
caching code when I am AFK for some time.

-- Stefan^2.
Received on Wed Jun 20 02:03:25 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.