[ https://issues.apache.org/jira/browse/PHOENIX-3167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15414143#comment-15414143 ]
James Taylor commented on PHOENIX-3167: --------------------------------------- We have a {{QueryServices.DEFAULT_KEEP_DELETED_CELLS_ATTRIB}} config parameter with a default value of {{QueryServicesOptions.DEFAULT_KEEP_DELETED_CELLS}} that appears to set KEEP_DELETED_CELLS. It's supposed to only be used if KEEP_DELETED_CELLS wasn't explicitly specified, but it seems like there's a bug. I remember in the past this was important for point-in-time deletes to work correctly. But it has some bad side effects, so I think we introduced that default mechanism to allow turning it off (and switch the default a while back to be false). I think we can change this behavior. I also think we should understand the point-in-time delete ramifications. > Recreating metadata of existing table removes HTable properties > --------------------------------------------------------------- > > Key: PHOENIX-3167 > URL: https://issues.apache.org/jira/browse/PHOENIX-3167 > Project: Phoenix > Issue Type: Bug > Reporter: Samarth Jain > Assignee: Samarth Jain > Fix For: 4.8.1 > > > {code} > @Test > public void testRecreatingExistingTableMaintainsHTableProperties() throws > Exception { > Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); > Connection conn = DriverManager.getConnection(getUrl(), props); > String ddl = "ALTER TABLE SYSTEM.CATALOG SET KEEP_DELETED_CELLS = > false"; > conn.createStatement().execute(ddl); > assertDeleteCellsDisabled(conn); > try { > > conn.createStatement().execute(QueryConstants.CREATE_TABLE_METADATA); > } catch (TableAlreadyExistsException e) { > } > assertDeleteCellsDisabled(conn); > } > > private void assertDeleteCellsDisabled(Connection conn) throws > org.apache.hadoop.hbase.TableNotFoundException, > IOException, SQLException { > try (HBaseAdmin admin = > conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) { > HTableDescriptor tableDesc = > admin.getTableDescriptor(Bytes.toBytes("SYSTEM.CATALOG")); > HColumnDescriptor[] columnFamilies = > tableDesc.getColumnFamilies(); > assertEquals("0", columnFamilies[0].getNameAsString()); > assertEquals(KeepDeletedCells.FALSE, > columnFamilies[0].getKeepDeletedCells()); > } > } > {code} > [~jamestaylor], [~apurtell], [~lhofhansl], [~mujtabachohan] - this is likely > why we saw that the keep deleted cells property always kept flipping to true > even though we set it to false in hbase shell. -- This message was sent by Atlassian JIRA (v6.3.4#6332)