directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu (JIRA)" <directory-...@incubator.apache.org>
Subject [jira] Closed: (DIREVE-92) Add JVM shutdown hook to prevent loss of cached entries
Date Fri, 03 Dec 2004 16:53:39 GMT
     [ http://nagoya.apache.org/jira/browse/DIREVE-92?page=history ]
     
Alex Karasulu closed DIREVE-92:
-------------------------------

    Resolution: Fixed

I added the hook registration easily enough to the constructor of the RootNexus.  This was
the approach I took because it only requires one hook registration to force the sync and close
of all backing stores via the root's close() method.  That way I don't have to waste a hook
thread for each partition backing store in the system.  I tested this all out and it works
like a champion.

While in the code I made the sync() and close() operations NOT fail fast.  Meaning they don't
blow chunks when they get an exception on a sync() or close() operation right when the operation
fails.  Instead the loop catches the exception holds a reference to it and then continues
forward to give all backing stores a chance before failing.  Then at the end the exceptions
are thrown using a MultiException which holds all collected exceptions.

I did this and now I'm finding out that sync ops are failing.  I will file another JIRA bug
with this since this problem is unrelated to this issue.

The changes for this were committed in revision 109696 here:

   http://svn.apache.org/viewcvs.cgi?rev=109696&view=rev


> Add JVM shutdown hook to prevent loss of cached entries
> -------------------------------------------------------
>
>          Key: DIREVE-92
>          URL: http://nagoya.apache.org/jira/browse/DIREVE-92
>      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:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message