[
https://issues.apache.org/jira/browse/HBASE-9058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13721679#comment-13721679
]
Matteo Bertozzi commented on HBASE-9058:
----------------------------------------
it doesn't mean that is the logically correct one :)
you're removing a dir with a running hbase, not just on hbase shutdown.
This means that the snapshot stuff must work even if the dir is not there,
and that the snapshot code can not rely on .snapshot startup initialization.
I prefer a list/delete way
{code}
for (SnapshotDescription snapshot: admin.listSnapshots()) {
admin.deleteSnapshot(snapshot.getName());
}
{code}
but do what you prefer, as you said we have already some code like this
> deleteSnapshot() call may be skipped in TestFlushSnapshotFromClient tests
> -------------------------------------------------------------------------
>
> Key: HBASE-9058
> URL: https://issues.apache.org/jira/browse/HBASE-9058
> Project: HBase
> Issue Type: Test
> Reporter: Ted Yu
> Assignee: Ted Yu
> Priority: Minor
> Attachments: 9058.patch, 9058.patch
>
>
> At the end of each test, we have this call:
> admin.deleteSnapshot(snapshotName);
> However it is not placed in finally block. When assertion in earlier part of
> the test fails (See [1]), snapshot cleanup would be skipped, leading to
> SnapshotTestingUtils.assertNoSnapshots() failing for subsequent tests.
> [1]:
> https://builds.apache.org/job/hbase-0.95-on-hadoop2/197/testReport/org.apache.hadoop.hbase.snapshot/TestFlushSnapshotFromClient/testFlushCreateListDestroy/
--
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