[jira] [Updated] (HBASE-18743) HFiles in use by a table which has the same name and namespace with a default table cloned from snapshot may be deleted when that snapshot and default table are deleted

2018-03-21 Thread stack (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stack updated HBASE-18743:
--
Fix Version/s: 2.0.0

> HFiles in use by a table which has the same name and namespace with a default 
> table cloned from snapshot may be deleted when that snapshot and default 
> table are deleted
> 
>
> Key: HBASE-18743
> URL: https://issues.apache.org/jira/browse/HBASE-18743
> Project: HBase
>  Issue Type: Bug
>  Components: hbase
>Affects Versions: 1.1.12
>Reporter: wenbang
>Assignee: wenbang
>Priority: Critical
> Fix For: 1.4.0, 1.3.2, 1.2.7, 2.0.0-alpha-3, 2.0.0
>
> Attachments: HBASE-18743-branch-1.patch, HBASE_18743.patch, 
> HBASE_18743_v1.patch, HBASE_18743_v2.patch
>
>
> We recently had a critical production issue in which HFiles that were still 
> in use by a table were deleted.
> This appears to have been caused by conditions in which table have the same 
> namespace and name with a default table cloned from snapshot.when snapshot 
> and default table be deleted,HFiles that are still in use may be deleted.
> For example:
> Table with default namespace is: "t1"
> The namespace of the new table is the same as the name of the default table, 
> and is generated by snapshot cloned : "t1: t1"
> When the snapshot and the default namespace table are deleted, the new table 
> is also deleted in the used HFiles
> This is because the creation of the BackReferenceFile get the table Name is 
> not normal, resulting in can not find the reference file, hfilecleaner to 
> delete the HFiles in used, when the table has not been major compact
> {code:java}
>   public static boolean create(final Configuration conf, final FileSystem fs,
>   final Path dstFamilyPath, final TableName linkedTable, final String 
> linkedRegion,
>   final String hfileName, final boolean createBackRef) throws IOException 
> {
> String familyName = dstFamilyPath.getName();
> String regionName = dstFamilyPath.getParent().getName();
> String tableName = 
> FSUtils.getTableName(dstFamilyPath.getParent().getParent())
> .getNameAsString();
> {code}
> {code:java}
>   public static TableName getTableName(Path tablePath) {
> return TableName.valueOf(tablePath.getParent().getName(), 
> tablePath.getName());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-18743) HFiles in use by a table which has the same name and namespace with a default table cloned from snapshot may be deleted when that snapshot and default table are deleted

2017-11-08 Thread Andrew Purtell (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Purtell updated HBASE-18743:
---
Fix Version/s: (was: 1.5.0)

> HFiles in use by a table which has the same name and namespace with a default 
> table cloned from snapshot may be deleted when that snapshot and default 
> table are deleted
> 
>
> Key: HBASE-18743
> URL: https://issues.apache.org/jira/browse/HBASE-18743
> Project: HBase
>  Issue Type: Bug
>  Components: hbase
>Affects Versions: 1.1.12
>Reporter: wenbang
>Assignee: wenbang
>Priority: Critical
> Fix For: 1.4.0, 1.3.2, 1.2.7, 2.0.0-alpha-3
>
> Attachments: HBASE-18743-branch-1.patch, HBASE_18743.patch, 
> HBASE_18743_v1.patch, HBASE_18743_v2.patch
>
>
> We recently had a critical production issue in which HFiles that were still 
> in use by a table were deleted.
> This appears to have been caused by conditions in which table have the same 
> namespace and name with a default table cloned from snapshot.when snapshot 
> and default table be deleted,HFiles that are still in use may be deleted.
> For example:
> Table with default namespace is: "t1"
> The namespace of the new table is the same as the name of the default table, 
> and is generated by snapshot cloned : "t1: t1"
> When the snapshot and the default namespace table are deleted, the new table 
> is also deleted in the used HFiles
> This is because the creation of the BackReferenceFile get the table Name is 
> not normal, resulting in can not find the reference file, hfilecleaner to 
> delete the HFiles in used, when the table has not been major compact
> {code:java}
>   public static boolean create(final Configuration conf, final FileSystem fs,
>   final Path dstFamilyPath, final TableName linkedTable, final String 
> linkedRegion,
>   final String hfileName, final boolean createBackRef) throws IOException 
> {
> String familyName = dstFamilyPath.getName();
> String regionName = dstFamilyPath.getParent().getName();
> String tableName = 
> FSUtils.getTableName(dstFamilyPath.getParent().getParent())
> .getNameAsString();
> {code}
> {code:java}
>   public static TableName getTableName(Path tablePath) {
> return TableName.valueOf(tablePath.getParent().getName(), 
> tablePath.getName());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18743) HFiles in use by a table which has the same name and namespace with a default table cloned from snapshot may be deleted when that snapshot and default table are deleted

2017-09-04 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated HBASE-18743:
---
  Resolution: Fixed
Hadoop Flags: Reviewed
  Status: Resolved  (was: Patch Available)

Thanks for the patch, wenbang.

Thanks for the review, Chia-ping.

> HFiles in use by a table which has the same name and namespace with a default 
> table cloned from snapshot may be deleted when that snapshot and default 
> table are deleted
> 
>
> Key: HBASE-18743
> URL: https://issues.apache.org/jira/browse/HBASE-18743
> Project: HBase
>  Issue Type: Bug
>  Components: hbase
>Affects Versions: 1.1.12
>Reporter: wenbang
>Assignee: wenbang
>Priority: Critical
> Fix For: 1.4.0, 1.3.2, 1.5.0, 1.2.7, 2.0.0-alpha-3
>
> Attachments: HBASE-18743-branch-1.patch, HBASE_18743.patch, 
> HBASE_18743_v1.patch, HBASE_18743_v2.patch
>
>
> We recently had a critical production issue in which HFiles that were still 
> in use by a table were deleted.
> This appears to have been caused by conditions in which table have the same 
> namespace and name with a default table cloned from snapshot.when snapshot 
> and default table be deleted,HFiles that are still in use may be deleted.
> For example:
> Table with default namespace is: "t1"
> The namespace of the new table is the same as the name of the default table, 
> and is generated by snapshot cloned : "t1: t1"
> When the snapshot and the default namespace table are deleted, the new table 
> is also deleted in the used HFiles
> This is because the creation of the BackReferenceFile get the table Name is 
> not normal, resulting in can not find the reference file, hfilecleaner to 
> delete the HFiles in used, when the table has not been major compact
> {code:java}
>   public static boolean create(final Configuration conf, final FileSystem fs,
>   final Path dstFamilyPath, final TableName linkedTable, final String 
> linkedRegion,
>   final String hfileName, final boolean createBackRef) throws IOException 
> {
> String familyName = dstFamilyPath.getName();
> String regionName = dstFamilyPath.getParent().getName();
> String tableName = 
> FSUtils.getTableName(dstFamilyPath.getParent().getParent())
> .getNameAsString();
> {code}
> {code:java}
>   public static TableName getTableName(Path tablePath) {
> return TableName.valueOf(tablePath.getParent().getName(), 
> tablePath.getName());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18743) HFiles in use by a table which has the same name and namespace with a default table cloned from snapshot may be deleted when that snapshot and default table are deleted

2017-09-03 Thread wenbang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wenbang updated HBASE-18743:

Attachment: (was: HBASE-18743_branch-1.patch)

> HFiles in use by a table which has the same name and namespace with a default 
> table cloned from snapshot may be deleted when that snapshot and default 
> table are deleted
> 
>
> Key: HBASE-18743
> URL: https://issues.apache.org/jira/browse/HBASE-18743
> Project: HBase
>  Issue Type: Bug
>  Components: hbase
>Affects Versions: 1.1.12
>Reporter: wenbang
>Assignee: wenbang
>Priority: Critical
> Fix For: 1.4.0, 1.3.2, 1.5.0, 1.2.7, 2.0.0-alpha-3
>
> Attachments: HBASE-18743-branch-1.patch, HBASE_18743.patch, 
> HBASE_18743_v1.patch, HBASE_18743_v2.patch
>
>
> We recently had a critical production issue in which HFiles that were still 
> in use by a table were deleted.
> This appears to have been caused by conditions in which table have the same 
> namespace and name with a default table cloned from snapshot.when snapshot 
> and default table be deleted,HFiles that are still in use may be deleted.
> For example:
> Table with default namespace is: "t1"
> The namespace of the new table is the same as the name of the default table, 
> and is generated by snapshot cloned : "t1: t1"
> When the snapshot and the default namespace table are deleted, the new table 
> is also deleted in the used HFiles
> This is because the creation of the BackReferenceFile get the table Name is 
> not normal, resulting in can not find the reference file, hfilecleaner to 
> delete the HFiles in used, when the table has not been major compact
> {code:java}
>   public static boolean create(final Configuration conf, final FileSystem fs,
>   final Path dstFamilyPath, final TableName linkedTable, final String 
> linkedRegion,
>   final String hfileName, final boolean createBackRef) throws IOException 
> {
> String familyName = dstFamilyPath.getName();
> String regionName = dstFamilyPath.getParent().getName();
> String tableName = 
> FSUtils.getTableName(dstFamilyPath.getParent().getParent())
> .getNameAsString();
> {code}
> {code:java}
>   public static TableName getTableName(Path tablePath) {
> return TableName.valueOf(tablePath.getParent().getName(), 
> tablePath.getName());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18743) HFiles in use by a table which has the same name and namespace with a default table cloned from snapshot may be deleted when that snapshot and default table are deleted

2017-09-03 Thread wenbang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wenbang updated HBASE-18743:

Attachment: (was: HBASE-18743_branch-1_v1.patch)

> HFiles in use by a table which has the same name and namespace with a default 
> table cloned from snapshot may be deleted when that snapshot and default 
> table are deleted
> 
>
> Key: HBASE-18743
> URL: https://issues.apache.org/jira/browse/HBASE-18743
> Project: HBase
>  Issue Type: Bug
>  Components: hbase
>Affects Versions: 1.1.12
>Reporter: wenbang
>Assignee: wenbang
>Priority: Critical
> Fix For: 1.4.0, 1.3.2, 1.5.0, 1.2.7, 2.0.0-alpha-3
>
> Attachments: HBASE-18743_branch-1.patch, HBASE-18743-branch-1.patch, 
> HBASE_18743.patch, HBASE_18743_v1.patch, HBASE_18743_v2.patch
>
>
> We recently had a critical production issue in which HFiles that were still 
> in use by a table were deleted.
> This appears to have been caused by conditions in which table have the same 
> namespace and name with a default table cloned from snapshot.when snapshot 
> and default table be deleted,HFiles that are still in use may be deleted.
> For example:
> Table with default namespace is: "t1"
> The namespace of the new table is the same as the name of the default table, 
> and is generated by snapshot cloned : "t1: t1"
> When the snapshot and the default namespace table are deleted, the new table 
> is also deleted in the used HFiles
> This is because the creation of the BackReferenceFile get the table Name is 
> not normal, resulting in can not find the reference file, hfilecleaner to 
> delete the HFiles in used, when the table has not been major compact
> {code:java}
>   public static boolean create(final Configuration conf, final FileSystem fs,
>   final Path dstFamilyPath, final TableName linkedTable, final String 
> linkedRegion,
>   final String hfileName, final boolean createBackRef) throws IOException 
> {
> String familyName = dstFamilyPath.getName();
> String regionName = dstFamilyPath.getParent().getName();
> String tableName = 
> FSUtils.getTableName(dstFamilyPath.getParent().getParent())
> .getNameAsString();
> {code}
> {code:java}
>   public static TableName getTableName(Path tablePath) {
> return TableName.valueOf(tablePath.getParent().getName(), 
> tablePath.getName());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18743) HFiles in use by a table which has the same name and namespace with a default table cloned from snapshot may be deleted when that snapshot and default table are deleted

2017-09-03 Thread wenbang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wenbang updated HBASE-18743:

Attachment: HBASE-18743-branch-1.patch

rename patch for branch-1

> HFiles in use by a table which has the same name and namespace with a default 
> table cloned from snapshot may be deleted when that snapshot and default 
> table are deleted
> 
>
> Key: HBASE-18743
> URL: https://issues.apache.org/jira/browse/HBASE-18743
> Project: HBase
>  Issue Type: Bug
>  Components: hbase
>Affects Versions: 1.1.12
>Reporter: wenbang
>Assignee: wenbang
>Priority: Critical
> Fix For: 1.4.0, 1.3.2, 1.5.0, 1.2.7, 2.0.0-alpha-3
>
> Attachments: HBASE-18743_branch-1.patch, HBASE-18743-branch-1.patch, 
> HBASE-18743_branch-1_v1.patch, HBASE_18743.patch, HBASE_18743_v1.patch, 
> HBASE_18743_v2.patch
>
>
> We recently had a critical production issue in which HFiles that were still 
> in use by a table were deleted.
> This appears to have been caused by conditions in which table have the same 
> namespace and name with a default table cloned from snapshot.when snapshot 
> and default table be deleted,HFiles that are still in use may be deleted.
> For example:
> Table with default namespace is: "t1"
> The namespace of the new table is the same as the name of the default table, 
> and is generated by snapshot cloned : "t1: t1"
> When the snapshot and the default namespace table are deleted, the new table 
> is also deleted in the used HFiles
> This is because the creation of the BackReferenceFile get the table Name is 
> not normal, resulting in can not find the reference file, hfilecleaner to 
> delete the HFiles in used, when the table has not been major compact
> {code:java}
>   public static boolean create(final Configuration conf, final FileSystem fs,
>   final Path dstFamilyPath, final TableName linkedTable, final String 
> linkedRegion,
>   final String hfileName, final boolean createBackRef) throws IOException 
> {
> String familyName = dstFamilyPath.getName();
> String regionName = dstFamilyPath.getParent().getName();
> String tableName = 
> FSUtils.getTableName(dstFamilyPath.getParent().getParent())
> .getNameAsString();
> {code}
> {code:java}
>   public static TableName getTableName(Path tablePath) {
> return TableName.valueOf(tablePath.getParent().getName(), 
> tablePath.getName());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18743) HFiles in use by a table which has the same name and namespace with a default table cloned from snapshot may be deleted when that snapshot and default table are deleted

2017-09-03 Thread wenbang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wenbang updated HBASE-18743:

Attachment: HBASE-18743_branch-1_v1.patch

move test to TestNamespace

> HFiles in use by a table which has the same name and namespace with a default 
> table cloned from snapshot may be deleted when that snapshot and default 
> table are deleted
> 
>
> Key: HBASE-18743
> URL: https://issues.apache.org/jira/browse/HBASE-18743
> Project: HBase
>  Issue Type: Bug
>  Components: hbase
>Affects Versions: 1.1.12
>Reporter: wenbang
>Assignee: wenbang
>Priority: Critical
> Fix For: 1.4.0, 1.3.2, 1.5.0, 1.2.7, 2.0.0-alpha-3
>
> Attachments: HBASE-18743_branch-1.patch, 
> HBASE-18743_branch-1_v1.patch, HBASE_18743.patch, HBASE_18743_v1.patch, 
> HBASE_18743_v2.patch
>
>
> We recently had a critical production issue in which HFiles that were still 
> in use by a table were deleted.
> This appears to have been caused by conditions in which table have the same 
> namespace and name with a default table cloned from snapshot.when snapshot 
> and default table be deleted,HFiles that are still in use may be deleted.
> For example:
> Table with default namespace is: "t1"
> The namespace of the new table is the same as the name of the default table, 
> and is generated by snapshot cloned : "t1: t1"
> When the snapshot and the default namespace table are deleted, the new table 
> is also deleted in the used HFiles
> This is because the creation of the BackReferenceFile get the table Name is 
> not normal, resulting in can not find the reference file, hfilecleaner to 
> delete the HFiles in used, when the table has not been major compact
> {code:java}
>   public static boolean create(final Configuration conf, final FileSystem fs,
>   final Path dstFamilyPath, final TableName linkedTable, final String 
> linkedRegion,
>   final String hfileName, final boolean createBackRef) throws IOException 
> {
> String familyName = dstFamilyPath.getName();
> String regionName = dstFamilyPath.getParent().getName();
> String tableName = 
> FSUtils.getTableName(dstFamilyPath.getParent().getParent())
> .getNameAsString();
> {code}
> {code:java}
>   public static TableName getTableName(Path tablePath) {
> return TableName.valueOf(tablePath.getParent().getName(), 
> tablePath.getName());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18743) HFiles in use by a table which has the same name and namespace with a default table cloned from snapshot may be deleted when that snapshot and default table are deleted

2017-09-03 Thread wenbang (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wenbang updated HBASE-18743:

Attachment: HBASE-18743_branch-1.patch

added patch to branch-1
thank you Chia-Ping Tsai,i have added the test.

> HFiles in use by a table which has the same name and namespace with a default 
> table cloned from snapshot may be deleted when that snapshot and default 
> table are deleted
> 
>
> Key: HBASE-18743
> URL: https://issues.apache.org/jira/browse/HBASE-18743
> Project: HBase
>  Issue Type: Bug
>  Components: hbase
>Affects Versions: 1.1.12
>Reporter: wenbang
>Assignee: wenbang
>Priority: Critical
> Fix For: 1.4.0, 1.3.2, 1.5.0, 1.2.7, 2.0.0-alpha-3
>
> Attachments: HBASE-18743_branch-1.patch, HBASE_18743.patch, 
> HBASE_18743_v1.patch, HBASE_18743_v2.patch
>
>
> We recently had a critical production issue in which HFiles that were still 
> in use by a table were deleted.
> This appears to have been caused by conditions in which table have the same 
> namespace and name with a default table cloned from snapshot.when snapshot 
> and default table be deleted,HFiles that are still in use may be deleted.
> For example:
> Table with default namespace is: "t1"
> The namespace of the new table is the same as the name of the default table, 
> and is generated by snapshot cloned : "t1: t1"
> When the snapshot and the default namespace table are deleted, the new table 
> is also deleted in the used HFiles
> This is because the creation of the BackReferenceFile get the table Name is 
> not normal, resulting in can not find the reference file, hfilecleaner to 
> delete the HFiles in used, when the table has not been major compact
> {code:java}
>   public static boolean create(final Configuration conf, final FileSystem fs,
>   final Path dstFamilyPath, final TableName linkedTable, final String 
> linkedRegion,
>   final String hfileName, final boolean createBackRef) throws IOException 
> {
> String familyName = dstFamilyPath.getName();
> String regionName = dstFamilyPath.getParent().getName();
> String tableName = 
> FSUtils.getTableName(dstFamilyPath.getParent().getParent())
> .getNameAsString();
> {code}
> {code:java}
>   public static TableName getTableName(Path tablePath) {
> return TableName.valueOf(tablePath.getParent().getName(), 
> tablePath.getName());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18743) HFiles in use by a table which has the same name and namespace with a default table cloned from snapshot may be deleted when that snapshot and default table are deleted

2017-09-03 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated HBASE-18743:
---
Summary: HFiles in use by a table which has the same name and namespace 
with a default table cloned from snapshot may be deleted when that snapshot and 
default table are deleted  (was: HFiles that are in use by a table whitch have 
the same name and namespace with a default table cloned from snapshot may be 
deleted when that snapshot and default table is deleted)

> HFiles in use by a table which has the same name and namespace with a default 
> table cloned from snapshot may be deleted when that snapshot and default 
> table are deleted
> 
>
> Key: HBASE-18743
> URL: https://issues.apache.org/jira/browse/HBASE-18743
> Project: HBase
>  Issue Type: Bug
>  Components: hbase
>Affects Versions: 1.1.12
>Reporter: wenbang
>Assignee: wenbang
>Priority: Critical
> Fix For: 1.4.0, 1.3.2, 1.5.0, 1.2.7, 2.0.0-alpha-3
>
> Attachments: HBASE_18743.patch, HBASE_18743_v1.patch, 
> HBASE_18743_v2.patch
>
>
> We recently had a critical production issue in which HFiles that were still 
> in use by a table were deleted.
> This appears to have been caused by conditions in which table have the same 
> namespace and name with a default table cloned from snapshot.when snapshot 
> and default table be deleted,HFiles that are still in use may be deleted.
> For example:
> Table with default namespace is: "t1"
> The namespace of the new table is the same as the name of the default table, 
> and is generated by snapshot cloned : "t1: t1"
> When the snapshot and the default namespace table are deleted, the new table 
> is also deleted in the used HFiles
> This is because the creation of the BackReferenceFile get the table Name is 
> not normal, resulting in can not find the reference file, hfilecleaner to 
> delete the HFiles in used, when the table has not been major compact
> {code:java}
>   public static boolean create(final Configuration conf, final FileSystem fs,
>   final Path dstFamilyPath, final TableName linkedTable, final String 
> linkedRegion,
>   final String hfileName, final boolean createBackRef) throws IOException 
> {
> String familyName = dstFamilyPath.getName();
> String regionName = dstFamilyPath.getParent().getName();
> String tableName = 
> FSUtils.getTableName(dstFamilyPath.getParent().getParent())
> .getNameAsString();
> {code}
> {code:java}
>   public static TableName getTableName(Path tablePath) {
> return TableName.valueOf(tablePath.getParent().getName(), 
> tablePath.getName());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)