[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/servers/slapd/tools slapcommon.c

At 02:19 PM 3/3/2003, Pierangelo Masarati wrote:
>> I think this fix (and possibly the prior code) is actually
>> bad.
>> slapcat -n N should exports the Nth database, period.
>> slapadd -n N should import the Nth database, period.
>I understand your point; but slapcat with no -n can be
>intended as cat what's available.  the monitor backend
>is something special, as the glue backend is: a trick
>to exploit backend structure facilities in something
>that's tightly built-in.

Just because its built-in doesn't mean it won't ever
support a slap tool (including future tools we might
add to the suite).  If you special case the monitor backend
today, you'll basically have to special case it forever.

>> If the user selects a database which doesn't (currently)
>> support exporting/importing, an error should be returned.
>agree: slapcat -n N where N is monitor is an error;
>and it is still treated as an error after my fix.

Yes, I see.  So its not as bad as I thought (guess I should
cut back on the caffeine :-).   One could say its a documentation
issue in that the default isn't "-n 1".

>agree with confusion.  If you think this fix is more confusing
>than helpful, please back it out :)  But note that, thanks
>to slapcommon.c, we're guaranteed that automatic database
>selection is the same for all tools (at least now).

I suggest that no options always refer to the "same" database
for all (current and hopefully future) tools.   Instead of
saying the default is "-n 1", we want to say the default is
the first backend which is not subordinate and not a monitor
backend.  I guess I'm fine with that... as long as you think
no one is ever going to implement slapcat'ing (or other tools)
for the monitor backend.