db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com.au>
Subject Re: Is it possible to force read-only mode?
Date Sun, 19 Jun 2005 23:21:31 GMT
Daniel John Debrunner wrote:

>>   5. The two hosts might not even be on the same network segment, and
>>      thus would be unable to intercommunicate at all.
>>    
>>
>
>
>If that's the case then even NFS won't work, right?
>
>  
>
Suppose your NFS server is available as 192.168.1.10 and 192.168.2.10.  
Hosts on 192.168.1.0/24 and 192.268.2.0/24 can't access each other, but 
they can _certainly_ access the fileserver.

>>It seems like this problem wouldn't exist at all if Derby didn't try to
>>lock the database.  My real question is, if I want to open it in
>>read-only mode anyway, what business does it have locking it from other
>>readers?
>>    
>>
>
>Because the readers wouldn't see a consistent, correct view of the
>database, and may have unpredictable failures. Readers in this case are
>a separate JVM running Derby opening the files in read only mode that
>are in use by another JVM running Derby. This mode is not supported.
>
>It is not supported because the active Derby engine does not write every
>update to disk as soon as it happens. It uses a write-ahead logging
>(WAL) system which ensures transaction durability without requiring all
>data changes to be made to disk. This is a performance benefit, if a
>transaction modifies, say, five rows then with a WAL scheme only one
>disk i/o is required to commit the transaction. Without WAL there would
>be up to five i/o's to commit.
>
>  
>
If someone was going to write to it, it wouldn't be read-only, would 
it?  I did say from the beginning that I wanted to open it in read-only 
mode.

I don't understand why this is such a big issue for a filesystem, when 
it allegedly works fine when the database is in a JAR file.  Where is 
your inconsistent state in that case?

Daniel

-- 
Daniel Noll

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.


Mime
View raw message