db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øystein Grøvlen (JIRA) <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-555) Unable to restart after disk is full
Date Tue, 04 Oct 2005 11:06:49 GMT
     [ http://issues.apache.org/jira/browse/DERBY-555?page=all ]

Øystein Grøvlen updated DERBY-555:

    Attachment: derby-555a.diff

Added a new patch that changes the message to derby.log and adds a test for this bug. 

With this patch, when a database is booted in read-only mode, the boot message in derby.log
will contain information about that.

I have also added a test, TurnsReadOnly.java, that without the fix, get the NPE.  This is
not in a disk full scenario, but it also occurs with a read-only DB directory.   Since there
is currently no way to turn write access back on from a Java program, the DB directory will
be read-only after the test is run.  Hence, the test framework will not be able to clean up
the test directory.  Therefore, this test is not added to the derbyall test suite.

The following files are changed:

M      java/engine/org/apache/derby/impl/store/raw/RawStore.java
      Do not check log location for read-only databases (avoids NPE)
M      java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
      Add information to boot message in derby.log when database is booted in read-only mode.
M      java/engine/org/apache/derby/iapi/reference/MessageId.java
      Added message id for the read-only part of the boot message
M      java/engine/org/apache/derby/loc/messages_en.properties
      Added text for the read-only part of the boot message
M      java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
      Added TurnsReadOnly_app.properties
A      java/testing/org/apache/derbyTesting/functionTests/tests/store/TurnsReadOnly.java
      New test that boots a database with log in non-default location, shuts it down, sets
DB directory to read-only, boots again and checks that DML is not allowed.
A      java/testing/org/apache/derbyTesting/functionTests/tests/store/TurnsReadOnly_app.properties
      Test properties
A      java/testing/org/apache/derbyTesting/functionTests/master/TurnsReadOnly.out
      Master file for new test.

I am currently running derbyall and will update report when test is finished.

> 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
>  Attachments: derby-555a.diff
> 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