Re: [viewvc-users] svndbadmin crashing

"C. Michael Pilato" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Organization CollabNet, Inc.
Message-ID <[email protected]>
On 06/29/2011 09:30 PM, Jean-Yves Avenard wrote:
> Hi there.
> 
> Rebuilding the database for our svn repository:
> 
> the svndbadmin crashes quite often:
> 
> Building commit info for revision 36691... skipped (no changes).
> /usr/local/viewvc/lib/cvsdb.py:90: Warning: Data truncated for column
> 'dir' at row 1

I've not done a deep dive into debugging this, but I wonder if this
truncation event is the problem.  And I wonder if it's a problem because of
a misinteraction with the in-memory ID cache that ViewVC's database code
tries to maintain for the sake of performance.

See, the ViewVC DB code holds a cache of IDs so it doesn't have to hit the
database quite so much for common lookups.  But the caching code is written
to trust that, barring a critical failure, the cache matches the database
contents.  I'm not sure that in the case of a truncation warning that's
actually true.  In other words, some higher-lever code says "I need the ID
for the directory /foo/bar/baz, and please create a new one if you don't
have one already."  The called code says "I'll check my cache first.  Nope,
nothing there.  So I'll tell MySQL to add the new row, retrieve the ID, and
update my cache."  But in this situation (truncation), MySQL does add a row
and return an ID, but the row data differs from the original data (it's
missing some characters at the end), and I think the caching code fails to
realize this.

Do you have any directories in your codebase longer than the 255-character
field width that's defined in the database schema?

-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2782146

To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk4ODrMACgkQokEGqRcG/W46JwCfWtJaQs2br5Mh1rJGQQoxUzym
zBgAn3ocrcgViRhJGvq+ruCpzh+GGw1T
=bg5d
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.