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 2016/05/06 00:32:12 UTC
[jira] [Resolved] (PHOENIX-2824) Rollback of multi-column secondary
indexes doesn't work
[ https://issues.apache.org/jira/browse/PHOENIX-2824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Taylor resolved PHOENIX-2824.
-----------------------------------
Resolution: Fixed
> Rollback of multi-column secondary indexes doesn't work
> -------------------------------------------------------
>
> Key: PHOENIX-2824
> URL: https://issues.apache.org/jira/browse/PHOENIX-2824
> Project: Phoenix
> Issue Type: Bug
> Reporter: Samarth Jain
> Assignee: James Taylor
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2824.patch, PHOENIX-2824_v2.patch
>
>
> Looking at this piece of code in PhoenixTransactionalIndexer in processRollback(), something isn't right:
> {code}
> do {
> Cell cell = cells.get(i);
> hasPuts |= cell.getTypeByte() == KeyValue.Type.Put.getCode();
> writePtr = cell.getTimestamp();
> do {
> // Add at the beginning of the list to match the expected HBase
> // newest to oldest sort order (which TxTableState relies on
> // with the Result.getLatestColumnValue() calls).
> singleTimeCells.addFirst(cell);
> } while (++i < nCells && cells.get(i).getTimestamp() == writePtr);
> } while (i < nCells && cells.get(i).getTimestamp() <= readPtr);
> {code}
> The cell variable isn't being reset in the inner loop even though index i has been incremented. As a result we always end up adding cells.get(0) to singleTimeCells list. However, simply doing this:
> {code}
> while (++i < nCells && (cell = cells.get(i)).getTimestamp() == writePtr)
> {code}
> unfortunately doesn't work. I see test failures in MutableRollbackIT after the above change.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)