db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Burlison <Alan.Burli...@sun.com>
Subject Re: Derby replication seems to be mostly useless
Date Mon, 13 Jul 2009 09:00:58 GMT
Dag H. Wanvik wrote:

> I suspect that when you use the programmatic approach, the databases
> are not shut down cleanly. If the servers are started from the command
> line, I think the booted databases are shut down cleanly.
> Cf these lines in NotworkServerControlImpl.java:
>         :
> 	// if the server is started from the command line, it should shutdown the
> 	// databases it has booted.
> 	private boolean shutdownDatabasesOnShutdown = false;
> This means that when the server is started via the API, each database
> needs to be shut down individually to get a clean shutdown (with
> checkpoint).

Unfortunately I don't think that's workable in practice.  Because Derby 
auto-starts databases on connection, there is no way of stopping clients 
opening the database again whilst the copy and child start is happening. 
  There needs to be some way to ensure the database is locked and then 
to flush the log entries.  Would a SYSCS_UTIL.SYSCS_FREEZE_DATABASE 
followed by a SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE do the trick?

Alan Burlison

View raw message