db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Thalamati (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-555) Unable to restart after disk is full
Date Fri, 02 Sep 2005 21:27:12 GMT
    [ http://issues.apache.org/jira/browse/DERBY-555?page=comments#action_12320936 ] 

Suresh Thalamati commented on DERBY-555:

One case I can think of  database disk is full and system is unable to create even a lock
(db.lck) file also.  In derby , there is this logic that declares database is read only ,
when it is not able to create files. Idea is  to boot  database in jar files ..etc in read
only mode . If   file creation IO error happens to occur , before it load the log factory
is loaded , then it  boots the read only verion of the log factory implementation, thinking
that databse is read only. 

you may want to look at the following code to see , if this is what is happening in u'r case:

private void bootLogFactory(boolean create, Properties startParams) throws StandardException
if (isReadOnly())
startParams.put(LogFactory.RUNTIME_ATTRIBUTES, LogFactory.RT_READONLY);
logFactory = (LogFactory)	Monitor.bootServiceModule(create, this, 

2) boot()  method 

3) ,private void privGetJBMSLockOnDB() throws StandardException this method marks the database
as readonly , if it is not able to create db.lck files. 

Marking database on disk full case seems to be incorrect as u mentioned. Problem here is ,we
want to automatically figure out the read only databases,  but java does not  seem have a
 DiskFull exception!!  



> Unable to restart after disk is full
> ------------------------------------
>          Key: DERBY-555
>          URL: http://issues.apache.org/jira/browse/DERBY-555
>      Project: Derby
>         Type: Bug
>   Components: Store
>     Versions:
>  Environment: Sun Sparc Solaris, 1.4 JDK, Derby Client/Server
>     Reporter: Øystein Grøvlen
>     Assignee: Øystein Grøvlen
>     Priority: Critical

> 1. Inserted data into the database until the disk was full. (5 clients inserting into
5 different tables in parallel.)
> 2. Shut down the server
> 3. Start the database again without freeing any disk space.
> When I try to start the database again, I get Null-pointer-exception, regardless of how
I connect (have tried embedded, client server, ij, jdbc applications).  I have not tried to
free some space on the disk before starting.  
> The call stack is not available right now (the computer I used had to be shut down due
to problems with our cooling system), but the exception comes from the following line in RawStore.java:
>      properties.put(Attribute.LOG_DEVICE, logFactory.getCanonicalLogPath());
> getCanonicalLogPath() returns null which results in a NPE in the hash table.
> A quick debug before the computer was stopped, showed that the logFactory was an instance
of org.apache.derby.impl.store.raw.log.ReadOnly which always returns null in its  getCanonicalLogPath().
> I suspect this may be related to the fact that I ran with the log in a non-default location.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message