directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <elecha...@gmail.com>
Subject Re: Dumping The Partition in DS 1.5
Date Wed, 26 Sep 2007 09:25:54 GMT
Simon,

FYI, regarding this damaged JDBM database, we have identified two issues atm :
- there is a race condition when stopping the server which occurs from
time to time (https://issues.apache.org/jira/browse/DIRSERVER-1047),
but I'm not 100% sure it has impact on the database
- As we are using a differed write system for entries, which default
to 15s between each flush, you may get a damaged database if the
server is brutally stopped (Kill -9, for instance)

As a consequence, we are working on a journalization mechanism which
will trace every modifications and replay them if the server is not in
a stable state when restarted. To avoid killing the server
performance, this must be a lightweight mechanism. We will implement
it through a new interceptor : changeLog
(https://issues.apache.org/jira/browse/DIRSERVER-1066)

This won't help you a lot right now, as this won't be ready in 2 days,
but I just wanted to inform you (and the dev list) about that.

Emmanuel

On 9/26/07, Simon.Temple@saaconsultants.com
<Simon.Temple@saaconsultants.com> wrote:
>
>
>
>
>
> Alex
>
>
>
> When we implemented early releases of DS 1.0 we found that under certain
> conditions (e.g. uncontrolled shutdown) the jdbm store/indexes became
> damaged.
>
>
>
> To enable our customer service department to determine if this was the cause
> of a reported fault, I added a method to our directory MBean to enumerate
> all of the jdbm indexes/entries.  If it failed then we have a procedure to
> remove all the jdbm store folders and restart DS with a backup LDIF.
>
>
>
> Whereas this capability is not a runtime requirement of our systems it is an
> important operational tool as jdbm storage has proved to be a little
> 'fragile'.
>
>
>
> So to reword my question:  How can I run an integrity check on the
> underlying jdbm stores?
>
>
>
>
>
> Many Thanks
>
>
>
> - Simon
>
>
> 25 September 2007 17:36
> To: "Apache Directory Developers List" <dev@directory.apache.org>
> cc:
> From: "Alex Karasulu" <akarasulu@apache.org>
> Subject: Re: Dumping The Partition in DS 1.5
>
> Simon,
>
> In 1.5 there is no longer a bootstrap registries.  Now the server bootstrap
> process starts up the schema
> partition and loads all the schema info from the schema partition with a
> minimal set of schema data.
>
> To help you out I need to know what your main objective is not how you're
> trying to solve some part of
> it.  You may just be doing it the wrong way and I might be able to suggest a
> better option.
>
> Alex
>
>
> On 9/25/07, Simon.Temple@saaconsultants.com <
> Simon.Temple@saaconsultants.com> wrote:
> >
> >
> > For an embedded DS I provide a dump method which prints the content of the
> jdbm partition(s) as a form of data integrity check.
> >
> > In order to implement this I think I need a reference to the
> bootstrapRegistries:
> >
> >             <snip>
> >
> >             JdbmMasterTable master = new JdbmMasterTable( recMan );
> >             AttributeType attributeType =
> bootstrapRegistries.getAttributeTypeRegistry(  )
> >
>    .lookup( "apacheUpdn" );
> >             JdbmIndex idIndex = new JdbmIndex( attributeType,
> >                     partitionDirectory, 1000, 1000 );
> >
> >             NamingEnumeration list = master.listTuples(  );
> >             StringBuffer buf = new StringBuffer(  );
> >
> >             while ( list.hasMore(  ) )
> >
> >             <snip>
> >
> > This code is very similar to my old DS 1.0 code and is a match to the code
> in 1.5 server-tools:dumpcmd:DumpCommandExecutor.java
> >
> > How do I get a reference to boostrapRegistries in an running, embedded
> directory?
> >
> > Doing this throws an exception:
> >
> >                Registries bootstrapRegistries = new DefaultRegistries(
> "bootstrap",
> >                     new BootstrapSchemaLoader(), new DefaultOidRegistry()
> );
> >
> > javax.naming.NamingException: OID for name 'apacheUpdn' was not found
> within the OID registry
> >  at
> org.apache.directory.server.schema.registries.DefaultOidRegistry.getOid(DefaultOidRegistry.java:113)
> >  at
> org.apache.directory.server.schema.registries.DefaultAttributeTypeRegistry.lookup(DefaultAttributeTypeRegistry.java:156)
> > <snip>
> >
> >
> > Many Thanks
> >
> >
> > Simon Temple
>
>


-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com

Mime
View raw message