You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2015/12/01 05:09:10 UTC
[jira] [Resolved] (PHOENIX-2374) Honor PTable.isWALDisabled() for
row deletes
[ 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)