directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niclas Hedhman (JIRA)" <>
Subject [jira] Commented: (DIREVE-92) Add JVM shutdown hook to prevent loss of cached entries
Date Fri, 03 Dec 2004 05:56:23 GMT
     [ ]
Niclas Hedhman commented on DIREVE-92:

Since you can have more than one hook in the JVM, I would suggest that each subsystem that
needs to deal with that condition adds it own hook.
    Runtime.getRuntime().addShutdownHook( hook );
where hook is a java.lang.Thread containing the code to be run upon shutdown.

> Add JVM shutdown hook to prevent loss of cached entries
> -------------------------------------------------------
>          Key: DIREVE-92
>          URL:
>      Project: Directory Eve
>         Type: Bug
>   Components: eve
>     Reporter: Alex Karasulu
>     Assignee: Alex Karasulu
>      Fix For: 0.8.0

> Looks like you can loose data if you shutdown the server after writing to it if you shutdown
before a sync operation.  This is similar to the buffer cache idea.  At this point all writes
are not persisted until a sync or buffers fill.  We will have the option later to use ACID
transactions for perisiting on each write.  This is slower but safer.
> For now we just need a JVM hook to sync on shutdown.  This way all caches get flushed
to disk before terminating when signals are trapped.  Gotta figure out how to do this.  Phoenix
did this nicely.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message