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

Why do we check the base checksum so often?

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Sat, 4 Feb 2012 08:04:16 -0600

The Ev2 shims get in the way of how text deltas are transmitted, by
reconstituting the full text, and then just streaming that to the
receiver via svn_txdelta_send_stream(). I've got a patch which
actually starts reporting the base checksum---which with the shims
will always be the "empty" checksum---and it turns out that such a
patch breaks the World.

The reason for this breakage is that there are several places in both
the FS and the WC that we check the delta editor's reported base
checksum against some other value we have on hand which we *think*
should be the base. Until now, these checks have always passed, since
there was an implicit understanding about what the delta editor would
use as its base.

However, I think that these checks are wrong. They rely upon an
implementation detail ("is the delta editor sending a text delta
against the base we think it ought to?") rather than the result ("did
we end up with the content we expected to end up with?") It should be
noted that we *already* check the result of the text delta application
against what the delta editor provides in close_file().

I've got a patch to remove this superfluous checking, but since the
code in question is of Ancient Date, I wanted to make sure the above
reasoning was correct before committing it. We catch a greater class
of errors through the checking of checksums we already do based upon
the *result* of the text delta, so such a change does not impact our
ability to detect corruption.



uberSVN: Apache Subversion Made Easy
Received on 2012-02-04 15:04:52 CET

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