You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by plasma <pl...@pchome.com.tw> on 2003/08/19 02:31:31 UTC

Strange error messages in svnadmin lsdblogs

Hi all,

Doing a 'svnadmin lsdblogs' to a repository that already have logfiles
deleted shows strange error messages.  Please see the following logs:

  plasma@plasmanb:~> svnadmin lsdblogs ~/SVN_ROOT | xargs rm
  plasma@plasmanb:~> svnadmin lsdblogs ~/SVN_ROOT
  subversion/libsvn_fs/bdb/bdb-err.c:48: (apr_err=160029)
  svn: Berkeley DB error
  svn: DB_NOTFOUND: No matching key/data pair found

But db4_archive returns nothing:

  plasma@plasmanb:~> db4_archive -h ~/SVN_ROOT/db
  plasma@plasmanb:~> 

So maybe 'svnadmin lsdblogs' should not show any error?


plasma


==========================================================
 �ح}�h���_�_�X���ҩ�+������y�Dz��w�֥]
 http://edm-prg.epaper.com.tw/click.php?ad_code=17782
==========================================================
 PChome�u�W�ʪ��g�~�y�G��T���BDV�ѤѰe
 http://shopping.pchome.com.tw/
==========================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by Greg Hudson <gh...@MIT.EDU>.
Is there actually a use case for listing all DB logs in a repository? 
Why do we need a command for it?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by cm...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:

> Ben Collins-Sussman <su...@collab.net> writes:
> > But I understand the counter-argument:  the name 'lsdblogs' does
> > exactly what it says -- lists the logs.  
> 
> Changing the behaviour of lsdblogs now is a bit of a problem, the
> potential to silently break existing scripts is high.  Perhaps we need
> another new command?

Ben points out that this is likely only to hurt people who a) were
familiar with 'svnadmin archive' and b) assume that the move from that
subcommand to 'lsdblogs' was simply a name change.

C-Mike points out that other folks are just guilty of leaping before
looking, and deserve every bit of pain they get as a result.

-1 on a new subcommand, +1 on users who pay attention.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:

> Michael Wood <mw...@its.uct.ac.za> writes:
>
>> On Mon, Aug 18, 2003 at 09:38:58PM -0500, Ben Collins-Sussman wrote:
>> > plasma <pl...@pchome.com.tw> writes:
>> > 
>> > > Hi all,
>> > > 
>> > > Doing a 'svnadmin lsdblogs' to a repository that already have logfiles
>> > > deleted shows strange error messages.  Please see the following logs:
>> > > 
>> > >   plasma@plasmanb:~> svnadmin lsdblogs ~/SVN_ROOT | xargs rm
>> > 
>> > You just deleted ALL your logs!!   I suspect your repository is now dead.
>> > 
>> > You need to pass --only-unused.
>> 
>> This is exactly why I suggested that the "only-unused" be the default.
>
> Heh, I got burned by this change too, and destroyed a test repository
> by accident.

Me too, it's possible we didn't choose the correct behaviour, being
different from db_archive could be a mistake.

> But I understand the counter-argument:  the name 'lsdblogs' does
> exactly what it says -- lists the logs.  

Changing the behaviour of lsdblogs now is a bit of a problem, the
potential to silently break existing scripts is high.  Perhaps we need
another new command?

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by Ben Collins-Sussman <su...@collab.net>.
Michael Wood <mw...@its.uct.ac.za> writes:

> On Mon, Aug 18, 2003 at 09:38:58PM -0500, Ben Collins-Sussman wrote:
> > plasma <pl...@pchome.com.tw> writes:
> > 
> > > Hi all,
> > > 
> > > Doing a 'svnadmin lsdblogs' to a repository that already have logfiles
> > > deleted shows strange error messages.  Please see the following logs:
> > > 
> > >   plasma@plasmanb:~> svnadmin lsdblogs ~/SVN_ROOT | xargs rm
> > 
> > You just deleted ALL your logs!!   I suspect your repository is now dead.
> > 
> > You need to pass --only-unused.
> 
> This is exactly why I suggested that the "only-unused" be the default.

Heh, I got burned by this change too, and destroyed a test repository
by accident.

But I understand the counter-argument:  the name 'lsdblogs' does
exactly what it says -- lists the logs.  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by cm...@collab.net.
Justin Erenkrantz <ju...@erenkrantz.com> writes:

> --On Tuesday, August 19, 2003 10:57 AM -0500 cmpilato@collab.net wrote:
> 
> > I'm sorry, what was that?  You think that 'archive' better described
> > what this subcommand does/did than 'lsdblogs' ?!  At least 'lsdblogs' ls's
> > the DB logs.  Archive never archived a single thing.
> 
> It almost perfectly paralleled BDB's db_archive command.  

Also misnamed.  Also never archived a thing.  But that's history.

> 'lsdblogs' is confusing.  (db_archive takes an argument to print out
> *all* logs, so why is it so difficult to do the same?  Why must we
> have renamed it?)

If the goal was to make our functionality look like a cheap wrapper
around a misnamed external utility, then yeah, it would have made
sense to stick with 'archive' and '--show-all'.  But the goal was to
make our functionality look like, well, *our* functionality.  So we
gave the subcommand a name that described what it actually did (and
this is, apparently, some theoretical crime?) and a default behavior
that followed from the name of the subcommand (again, we're doing
something wrong here?).

> The one argument that I'd have for keeping 'archive'/'recover' is that
> I'm betting we're having lots of people whose 'db_recover' in their
> PATH isn't the same as the BDB library they built SVN with.  So,
> keeping it within svnadmin makes some sense because I'm betting people
> have run recover against their repository with different BDB builds.
> And, we're fairly sure that will cause repository corruption.  --

And this is, in my opinion, the only decent thing to come from the
implementation of these two subcommands.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Tuesday, August 19, 2003 10:57 AM -0500 cmpilato@collab.net wrote:

> I'm sorry, what was that?  You think that 'archive' better described
> what this subcommand does/did than 'lsdblogs' ?!  At least 'lsdblogs' ls's
> the DB logs.  Archive never archived a single thing.

It almost perfectly paralleled BDB's db_archive command.  So, yes, I think it 
made a *lot* of sense in that respect.  'lsdblogs' is confusing.  (db_archive 
takes an argument to print out *all* logs, so why is it so difficult to do the 
same?  Why must we have renamed it?)

The one argument that I'd have for keeping 'archive'/'recover' is that I'm 
betting we're having lots of people whose 'db_recover' in their PATH isn't the 
same as the BDB library they built SVN with.  So, keeping it within svnadmin 
makes some sense because I'm betting people have run recover against their 
repository with different BDB builds.  And, we're fairly sure that will cause 
repository corruption.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by cm...@collab.net.
Justin Erenkrantz <ju...@erenkrantz.com> writes:

> --On Tuesday, August 19, 2003 10:20 AM -0500 cmpilato@collab.net wrote:
> 
> > It's an grammatical thing, I think.  'svnadmin lsdblogs' implies that
> > you want to see some DB logs.  I mean, there they are, right there in
> > you db/ subdir, you can see them, and yet this function doesn't list
> > them?!
> 
> No.  I think this function is essentially giving our users a loaded
> gun with the safety off.  I *hate* the current semantics of lsdblogs.
> The name sucks as well as the switch in meanings from archive to now
> show all of the logs.
> 
> > Oooooh.  I forgot to run 'svnadmin lsdblogs --i-really-mean-it-this-time'.
> > How silly of me!
> 
> If that's really the function of lsdblogs, I don't think it has any
> value -
> just use ls instead.  The *only* value that Subversion can offer is
> providing the list of BDB logs that can be safely deleted.
> 
> Listing all of the log files isn't helpful to anyone.  And, I believe
> it is more harmful than anything else.  I think lsdblogs should be
> removed and go back to archive.  Add a flag to archive that says,
> 'show me all logs' - who knows why anyone would need that, but
> whatever.  The change was ill-conceived to begin with.  -- justin

I'm sorry, what was that?  You think that 'archive' better described
what this subcommand does/did than 'lsdblogs' ?!  At least 'lsdblogs' ls's
the DB logs.  Archive never archived a single thing.

I think you're missing the big picture that encompasses this change.
The routine for doing a hot backup of a Berkeley repository involves
copying *all* logfiles, and then possibly archiving away only the
unused ones.  Sure, you can just copy log.* if you want to --
whatever.  I can't help but to think, though, if Berkeley thought it
was safe for folks to do this, they probably wouldn't have written
their own db_archive program to do the same basic tasks we're doing
here.

Again, I'll state my position that I think both 'svnadmin
archive/lsdblogs' and 'svnadmin recover' should go away, and that
folks who want to play with databases learn a thing or two about
maintaining them.  I have no love affair with this subcommand,
regardless of its name.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Tuesday, August 19, 2003 10:20 AM -0500 cmpilato@collab.net wrote:

> It's an grammatical thing, I think.  'svnadmin lsdblogs' implies that
> you want to see some DB logs.  I mean, there they are, right there in
> you db/ subdir, you can see them, and yet this function doesn't list
> them?!

No.  I think this function is essentially giving our users a loaded gun with 
the safety off.  I *hate* the current semantics of lsdblogs.  The name sucks 
as well as the switch in meanings from archive to now show all of the logs.

> Oooooh.  I forgot to run 'svnadmin lsdblogs --i-really-mean-it-this-time'.
> How silly of me!

If that's really the function of lsdblogs, I don't think it has any value - 
just use ls instead.  The *only* value that Subversion can offer is providing 
the list of BDB logs that can be safely deleted.

Listing all of the log files isn't helpful to anyone.  And, I believe it is 
more harmful than anything else.  I think lsdblogs should be removed and go 
back to archive.  Add a flag to archive that says, 'show me all logs' - who 
knows why anyone would need that, but whatever.  The change was ill-conceived 
to begin with.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by cm...@collab.net.
"Sander Striker" <st...@apache.org> writes:

> > From: Michael Wood [mailto:mwood@its.uct.ac.za]
> > Sent: Tuesday, August 19, 2003 12:15 PM
> 
> > On Mon, Aug 18, 2003 at 09:38:58PM -0500, Ben Collins-Sussman wrote:
> >> You just deleted ALL your logs!!   I suspect your repository is now dead.
> >> 
> >> You need to pass --only-unused.
> > 
> > This is exactly why I suggested that the "only-unused" be the default.
> 
> Which is definitely a better idea.  Why are we suddenly choosing
> the dangerous path where we are usually going for safe by default?

It's an grammatical thing, I think.  'svnadmin lsdblogs' implies that
you want to see some DB logs.  I mean, there they are, right there in
you db/ subdir, you can see them, and yet this function doesn't list
them?!

Oooooh.  I forgot to run 'svnadmin lsdblogs --i-really-mean-it-this-time'.
How silly of me!

This is no more unsafe that 'ls' (which, you'll note, doesn't default
to --only-things-you-somehow-know-i-want-to-delete).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: Strange error messages in svnadmin lsdblogs

Posted by Sander Striker <st...@apache.org>.
> From: Michael Wood [mailto:mwood@its.uct.ac.za]
> Sent: Tuesday, August 19, 2003 12:15 PM

> On Mon, Aug 18, 2003 at 09:38:58PM -0500, Ben Collins-Sussman wrote:
>> You just deleted ALL your logs!!   I suspect your repository is now dead.
>> 
>> You need to pass --only-unused.
> 
> This is exactly why I suggested that the "only-unused" be the default.

Which is definitely a better idea.  Why are we suddenly choosing
the dangerous path where we are usually going for safe by default?

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by Michael Wood <mw...@its.uct.ac.za>.
On Mon, Aug 18, 2003 at 09:38:58PM -0500, Ben Collins-Sussman wrote:
> plasma <pl...@pchome.com.tw> writes:
> 
> > Hi all,
> > 
> > Doing a 'svnadmin lsdblogs' to a repository that already have logfiles
> > deleted shows strange error messages.  Please see the following logs:
> > 
> >   plasma@plasmanb:~> svnadmin lsdblogs ~/SVN_ROOT | xargs rm
> 
> You just deleted ALL your logs!!   I suspect your repository is now dead.
> 
> You need to pass --only-unused.

This is exactly why I suggested that the "only-unused" be the default.

-- 
Michael Wood <mw...@its.uct.ac.za>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Strange error messages in svnadmin lsdblogs

Posted by Ben Collins-Sussman <su...@collab.net>.
plasma <pl...@pchome.com.tw> writes:

> Hi all,
> 
> Doing a 'svnadmin lsdblogs' to a repository that already have logfiles
> deleted shows strange error messages.  Please see the following logs:
> 
>   plasma@plasmanb:~> svnadmin lsdblogs ~/SVN_ROOT | xargs rm

You just deleted ALL your logs!!   I suspect your repository is now dead.

You need to pass --only-unused.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org