phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-2374) Honor PTable.isWALDisabled() for row deletes
Date Thu, 05 Nov 2015 00:26:27 GMT
James Taylor created PHOENIX-2374:
-------------------------------------

             Summary: Honor PTable.isWALDisabled() for row deletes
                 Key: PHOENIX-2374
                 URL: https://issues.apache.org/jira/browse/PHOENIX-2374
             Project: Phoenix
          Issue Type: Bug
            Reporter: James Taylor


Just noticed this incorrect code in PTableImpl.PRowImpl.delete():
{code}
        @Override
        public void delete() {
            newMutations();
            Delete delete = new Delete(key);
            for (PColumnFamily colFamily : families) {
            	delete.deleteFamily(colFamily.getName().getBytes(), ts);
            }
            deleteRow = delete;
            // No need to write to the WAL for indexes
            if (PTableImpl.this.getType() == PTableType.INDEX) {
                deleteRow.setDurability(Durability.SKIP_WAL);
            }
        }
{code}
We shouldn't special case indexes, but just use the standard isWALDisabled() check here like
this:
{code}
        @Override
        public void delete() {
            newMutations();
            Delete delete = new Delete(key);
            for (PColumnFamily colFamily : families) {
            	delete.deleteFamily(colFamily.getName().getBytes(), ts);
            }
            deleteRow = delete;
            if (PTableImpl.this.isWALDisabled()) {
                deleteRow.setDurability(Durability.SKIP_WAL);
            }
        }
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message