Re: [viewvc-users] "svndbadmin -v rebuild" fails with "Exception: Error adding commit: '(1048, "Column 'dirid' cannot be null")'"

"C. Michael Pilato" <[email protected]> Wed, 14 Oct 2015 08:09:16 -0400
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Message-ID <CAFVDjdw=VRQg9pNJpwz67T-o8B-MTMgOgpnXGA9VZ7wGwFCbOQ@mail.gmail.com>
------=_Part_8106_115003234.1444824567411
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

On Tue, Oct 6, 2015 at 2:06 AM, Bogdan Ionescu <[email protected]>
wrote:

> Hi,
>
> While populating the ViewVC Checkin database via "svndbadmin" I got the
> following error:
>
>
[...]


> Exception: Error adding commit: '(1048, "Column 'dirid' cannot be null")'
>

[...]


> Checking my SVN logs, this is definitely the case, revision 1574 has
> paths longer than 255 characters. It's related to some nodejs libraries
> which have tons of nested modules that in the end give the greater than
> 255 char paths. What's interesting is that the"svndbadmin update
> "$REPOS" "$REV"" in the "post-commit" svn hook passed when the 1574
> commit originally took place. So why would an "svndbadmin update" work
> but a subsequent "svndbadmin rebuild" fail on said revision? I can also
> browse this revision in ViewVC without any problems, i.e."svndbadmin
> update" must have worked on this revision since it is present in the
> ViewVC Chekin database.
>

I'm not sure why "update" would work while "rebuild" does not, especially
since they do essentially the same thing when you're talking about adding
new revisions to the DB.


> Since it this seems that paths with 255+ chars is becoming the norm,
> would it be possible to add support for such a scenario? Is there
> currently a work around? Maybe a way to have the "svndbadmin rebuild"
> continue instead of stopping?


It is possible to add support for long paths (with a DB schema change), yes.

And having the rebuild process accept an option that means "report, but
don't quit, on an error" is a good idea, too.  Or rather, "report, but
don't quit, on particular types of non-fatal errors".  After all, it's not
as if the data from one revision depends on that of another in this DB
schema.

-- Mike

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

To unsubscribe from this discussion, e-mail: [[email protected]].
------=_Part_8106_115003234.1444824567411
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
ue, Oct 6, 2015 at 2:06 AM, Bogdan Ionescu <span dir=3D"ltr">&lt;<a href=3D=
"mailto:[email protected]" target=3D"_blank">[email protected]</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
While populating the ViewVC Checkin database via &quot;svndbadmin&quot; I g=
ot the<br>
following error:<br><br></blockquote><div><br></div><div>[...]</div><div>=
=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex">
Exception: Error adding commit: &#39;(1048, &quot;Column &#39;dirid&#39; ca=
nnot be null&quot;)&#39;<br></blockquote><div><br></div><div>[...]</div><di=
v>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex">Checking my SVN logs, this is =
definitely the case, revision 1574 has<br>
paths longer than 255 characters. It&#39;s related to some nodejs libraries=
<br>
which have tons of nested modules that in the end give the greater than<br>
255 char paths. What&#39;s interesting is that the&quot;svndbadmin update<b=
r>
&quot;$REPOS&quot; &quot;$REV&quot;&quot; in the &quot;post-commit&quot; sv=
n hook passed when the 1574<br>
commit originally took place. So why would an &quot;svndbadmin update&quot;=
 work<br>
but a subsequent &quot;svndbadmin rebuild&quot; fail on said revision? I ca=
n also<br>
browse this revision in ViewVC without any problems, i.e.&quot;svndbadmin<b=
r>
update&quot; must have worked on this revision since it is present in the<b=
r>
ViewVC Chekin database.<br></blockquote><div><br></div><div>I&#39;m not sur=
e why &quot;update&quot; would work while &quot;rebuild&quot; does not, esp=
ecially since they do essentially the same thing when you&#39;re talking ab=
out adding new revisions to the DB.</div><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">Since it this seems that paths with 255+ chars is becoming th=
e norm,<br>
would it be possible to add support for such a scenario? Is there<br>
currently a work around? Maybe a way to have the &quot;svndbadmin rebuild&q=
uot;<br>
continue instead of stopping?</blockquote><div><br></div><div>It is possibl=
e to add support for long paths (with a DB schema change), yes.</div><div><=
br></div><div>And having the rebuild process accept an option that means &q=
uot;report, but don&#39;t quit, on an error&quot; is a good idea, too.=C2=
=A0 Or rather, &quot;report, but don&#39;t quit, on particular types of non=
-fatal errors&quot;.=C2=A0 After all, it&#39;s not as if the data from one =
revision depends on that of another in this DB schema.<br></div><div><br></=
div><div>-- Mike</div></div></div></div>

------=_Part_8106_115003234.1444824567411--