You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2011/05/03 14:37:03 UTC

[jira] [Created] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Write tests to verify the interaction of TRUNCATE TABLE and online backup
-------------------------------------------------------------------------

                 Key: DERBY-5213
                 URL: https://issues.apache.org/jira/browse/DERBY-5213
             Project: Derby
          Issue Type: Task
          Components: SQL, Store
    Affects Versions: 10.9.0.0
            Reporter: Rick Hillegas


An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:

o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
o uncommitred truncate table, followed by online backup that keeps logs,
  then commit the truncate, and then access the table in the backup.

For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450867#comment-13450867 ] 

Myrna van Lunteren edited comment on DERBY-5213 at 9/8/12 5:33 AM:
-------------------------------------------------------------------

Thanks for noticing those failures Knut. 
I'll take a look at it on Monday. I've disabled the test (commented out in lang._Suite) for now with revision: http://svn.apache.org/viewvc?view=revision&revision=1382114.
                
      was (Author: myrna):
    Thanks for noticing those failures Knut. 
I'll take a look at it on Monday. I've disabled (commented out in lang._Suite) for now with revision: http://svn.apache.org/viewvc?view=revision&revision=1382114.
                  
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1, DERBY-5213.diff_2
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445114#comment-13445114 ] 

Mike Matrigali commented on DERBY-5213:
---------------------------------------

the tests in the preliminary patch look good.  This is just from a reading of the code, did not compile/run it.

Some nits:
o would be nice to have hdr comment on testUncommittedTruncateBackupEnableLog
o assertDirectoryDeleted() seems like something that should be in a test utility that could be
   used in all tests rather than specific tests.

stuff that should not hold up a commit:
o An interesting test would be to have truncate table happen "during the backup".  This is a lot harder to write as timing is very
   critical.  Spent some time thinking about this but could not come up with a user level code way to test this for sure.  Could 
   hack the actual code to help testing but that is not a great idea.  
o could add tests of freeze and unfreeze with respect to truncate.

                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450620#comment-13450620 ] 

Knut Anders Hatlen commented on DERBY-5213:
-------------------------------------------

There were some failures in the nightly tests after the new test went in:

http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/vista-64/1381230-suitesAll_diff.txt
http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/sol/1381654-suitesAll_diff.txt
http://dbtg.foundry.sun.com/derby/test/Daily/javaME/testing/testlog/ubuntu/1381230-suitesAll_diff.txt
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1, DERBY-5213.diff_2
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448063#comment-13448063 ] 

Myrna van Lunteren commented on DERBY-5213:
-------------------------------------------

regression tests went fine, so I committed the _2.diff patch with revision 1380779 (http://svn.apache.org/viewvc?view=revision&revision=1380779)
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1, DERBY-5213.diff_2
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren resolved DERBY-5213.
---------------------------------------

          Resolution: Fixed
       Fix Version/s: 10.10.0.0
    Issue & fix info: Newcomer  (was: Newcomer,Patch Available)

Committed with revision http://svn.apache.org/viewvc?view=revision&revision=1383677.
Looks like tests have passed ok. Resolving.
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>             Fix For: 10.10.0.0
>
>         Attachments: DERBY_5213.diff_1, DERBY-5213.diff_2, DERBY-5213.diff_3
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443714#comment-13443714 ] 

Myrna van Lunteren commented on DERBY-5213:
-------------------------------------------

oops, just realized I forgot to undo the changes to lang._Suite in my initial patch for this - I commented out a bunch of tests for a mini-trial run.
That's of course not intended for commit.
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5213:
--------------------------------------

    Issue & fix info: Newcomer,Patch Available  (was: Newcomer)

I could use a review of this preliminary patch.
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450867#comment-13450867 ] 

Myrna van Lunteren commented on DERBY-5213:
-------------------------------------------

Thanks for noticing those failures Knut. 
I'll take a look at it on Monday. I've disabled (commented out in lang._Suite) for now with revision: http://svn.apache.org/viewvc?view=revision&revision=1382114.
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1, DERBY-5213.diff_2
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5213:
--------------------------------------

    Attachment: DERBY-5213.diff_3

Attaching a patch which
- adds a third fixture, which tests an uncommitted truncate table followed by freeze/copy/unfreeze
- removes the decorateSQL method and moves the creation and population of the truncable table to setUp(), and drops the table in teardown()
- reinstates the test in lang._Suite

I will commit this shortly.
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1, DERBY-5213.diff_2, DERBY-5213.diff_3
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5213:
--------------------------------------

    Attachment: DERBY_5213.diff_1

Attaching a patch which does mostly precisely what was suggested in the email exchange, and this patch is ready for review.

I think there are some further tests that can be added, for instance, there's some discussion in the reference guide about using blocking or not blocking behavior of SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE and SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_NOWAIT. 

Perhaps also a test that tries to do a rollback of the truncate table.


                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453559#comment-13453559 ] 

Myrna van Lunteren commented on DERBY-5213:
-------------------------------------------

I've taken a quick look, and it seems to me the problem was that the sequence of the tests *was* important - one of the tests did a truncate table and committed it.
As that wasn't my intention, I've removed the decorateSQL and put the relevant code into the setUp() and dropped the table in a teardown() method.
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1, DERBY-5213.diff_2
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445102#comment-13445102 ] 

Rick Hillegas commented on DERBY-5213:
--------------------------------------

Hi Myrna,

It looks to me as though the test tackles both cases described on this JIRA. I'm a little confused by the queries which are supposed to check that the table has 1000 rows and 0 rows. It seems to me that the queries are only looking at the last 2 rows in the table and are not really verifying what they claim to. Maybe "select count(*) from truncable" would be a better query. Thanks.
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5213:
--------------------------------------

    Attachment: DERBY-5213.diff_2

Thank you for the reviews Rick and Mike.

Rick - you are right of course. For some reason I just didn't want to do a select count, but it's the more logical query, so I changed it.
Mike - I added a comment describing the second fixture, and there was already an assertDirectoryDeleted in org.apache.derbyTesting.junit.BaseTestCase, so I removed the local method.

I'm running regressions now, and assuming they go well, I will commit this patch; then I'll start working on the other testing suggestions.


                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY_5213.diff_1, DERBY-5213.diff_2
>
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5213) Write tests to verify the interaction of TRUNCATE TABLE and online backup

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5213:
--------------------------------------

    Assignee: Myrna van Lunteren

I'm going to make a stab at writing a test for this.
                
> Write tests to verify the interaction of TRUNCATE TABLE and online backup
> -------------------------------------------------------------------------
>
>                 Key: DERBY-5213
>                 URL: https://issues.apache.org/jira/browse/DERBY-5213
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>    Affects Versions: 10.9.1.0
>            Reporter: Rick Hillegas
>            Assignee: Myrna van Lunteren
>
> An uncommitted TRUNCATE TABLE command does not block online backup. We should verify that the online and backed up databases are both in a consistent state. At a minimum, we should test the following:
> o uncommitted truncate table followed by online backup and then access the backup copy and access the table.  should see the old data.
> o uncommitred truncate table, followed by online backup that keeps logs,
>   then commit the truncate, and then access the table in the backup.
> For more information, please see this email thread: http://old.nabble.com/truncating-a-table-vs-online-backup-to31524933.html#a31524933

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira