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] [Resolved] (PHOENIX-2374) Honor PTable.isWALDisabled() for row deletes
Date Tue, 01 Dec 2015 04:09:10 GMT

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

James Taylor resolved PHOENIX-2374.
-----------------------------------
       Resolution: Fixed
         Assignee: James Taylor
    Fix Version/s: 4.7.0

> 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
>            Assignee: James Taylor
>             Fix For: 4.7.0
>
>         Attachments: PHOENIX-2374.patch
>
>
> 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