db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: [jira] Updated: (DERBY-239) Need a online backup feature that does not block update operations when online backup is in progress.
Date Thu, 17 Nov 2005 23:01:27 GMT
I have tested this patch and reviewed the changes and
have commited it as svn 345355.

I have the following
suggestions from review, and will look at any subsequent
changes in these areas that Suresh would like to submit:

o RawStore.java!canStartOnlineBackup() has a todo item - needs an 
exception error to be thrown.

o will things like sort and temporary containers cause online
   backup to wait if they are outstanding?  Does the pre-existing
   backup cause sorts and temp tables to
   be logged during online backup?
   (these questions probably apply to BaseDataFileFactory.java)

o could you pick one place in the code to describe how all the
   routines work together to provide the functionality you need.
   I think basically put the description that you have in the
   JIRA for this patch somewhere in the code. The individual routines
   have comments but it hard to see how they all work together
   without one place descibing the interaction.

o as I was reviewing I fixed some >80 line stuff.
  I know sometimes it is hard, but
   at least stuff like comments is really easy.

o may be interesting to add external sort testing and queries
   that cause temp tables.  probably dependent on answer to above
   question.

Suresh Thalamati (JIRA) wrote:
>      [ http://issues.apache.org/jira/browse/DERBY-239?page=all ]
> 
> Suresh Thalamati updated DERBY-239:
> -----------------------------------
> 
>     Attachment: onlinebackup_3.diff
> 
> This patch adds code to support real-time online backup with unlogged
> operations. A consistent backup can not be made if there are pending
> transactions with unlogged operations or if unlogged operations 
> occur when backup is in progress. Because container files can  be copied 
> to the backup before the transaction is committed and the data pages are 
> flushed as part of the commit. As there is no transaction log for unlogged
> operations, while restoring from the backup database can not be restored to 
> a consistent state. To make a consistent online backup in this scenario, this patch:
> 
> 1)  blocks  online backup until all the transactions with unlogged operation are
>     committed/aborted. 
> 2)  implicitly converts all unlogged operations to logged mode for the duration
>     of the online backup, if they are started when backup is in progress. 
> 
> This patch also adds a test to test the online backup in parallel with some DML,
> DDL and unlogged operations. 
>  
> TESTS : derbyall test suite passed on Windows XP/JDK142
> 
> It would be great if some can review and commit this patch. 
> 
> 
> svn stat:
> 
> M      java\engine\org\apache\derby\impl\store\raw\xact\Xact.java
> M      java\engine\org\apache\derby\impl\store\raw\xact\XactFactory.java
> M      java\engine\org\apache\derby\impl\store\raw\RawStore.java
> M      java\engine\org\apache\derby\impl\store\raw\data\BaseDataFileFactory.java
> 
> M      java\engine\org\apache\derby\iapi\store\raw\xact\RawTransaction.java
> M      java\engine\org\apache\derby\iapi\store\raw\xact\TransactionFactory.java
> M      java\testing\org\apache\derbyTesting\functionTests\tests\storetests\st_1.sql
> A      java\testing\org\apache\derbyTesting\functionTests\tests\store\OnlineBackupTest1_app.properties
> A      java\testing\org\apache\derbyTesting\functionTests\tests\store\OnlineBackup.java
> M      java\testing\org\apache\derbyTesting\functionTests\tests\store\copyfiles.ant
> A      java\testing\org\apache\derbyTesting\functionTests\tests\store\OnlineBackupTest1.java
> M      java\testing\org\apache\derbyTesting\functionTests\master\st_1.out
> A      java\testing\org\apache\derbyTesting\functionTests\master\OnlineBackupTest1.out
> M      java\testing\org\apache\derbyTesting\functionTests\suites\storemore.runall
> 
> 
> 
>>Need a online backup feature  that does not block update operations   when online
backup is in progress.
>>--------------------------------------------------------------------------------------------------------
>>
>>         Key: DERBY-239
>>         URL: http://issues.apache.org/jira/browse/DERBY-239
>>     Project: Derby
>>        Type: New Feature
>>  Components: Store
>>    Versions: 10.1.1.0
>>    Reporter: Suresh Thalamati
>>    Assignee: Suresh Thalamati
>> Attachments: onlinebackup.html, onlinebackup_1.diff, onlinebackup_2.diff, onlinebackup_3.diff
>>
>>Currently Derby allows users to perfoms  online backups using SYSCS_UTIL.SYSCS_BACKUP_DATABASE()
procedure,  but while the backup is in progress, update operations are temporarily blocked,
but read operations can still proceed.
>>Blocking update operations can be real issue specifically in client server environments,
because user requests will be blocked for a long time if a 
>>backup is in the progress on the server.
> 
> 


Mime
View raw message