phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1147) Add test cases to cover more index update failure scenarios
Date Thu, 07 Aug 2014 00:15:11 GMT


James Taylor commented on PHOENIX-1147:

So the root of the problem (as you've found) is that our ALTER INDEX call does not cause the
data table to be sent over again next time. I think the easiest way to solve this is to do
a Put on the data table by adding it to the tableMetaData before you call region.mutateRowsWithLocks(tableMetadata,
Collections.<byte[]> emptySet()). Maybe you can just do a put on the empty key value
(as you know the value is an empty byte array without having to look it up)? Might need to
tweak the logic that calculates the timeStamp in getTable(). Just add the following to the
else block as well, like this, so that if the empty key value has the biggest ts, it'll be
used too:

    private PTable getTable(RegionScanner scanner, long clientTimeStamp, long tableTimeStamp)

        while (i < results.size() && j < TABLE_KV_COLUMNS.size()) {
            Cell kv = results.get(i);
            timeStamp = Math.max(timeStamp, kv.getTimestamp()); // Find max timestamp of table
header row
            Cell searchKv = TABLE_KV_COLUMNS.get(j);
            int cmp =
                    Bytes.compareTo(kv.getQualifierArray(), kv.getQualifierOffset(),
                        kv.getQualifierLength(), searchKv.getQualifierArray(),
                        searchKv.getQualifierOffset(), searchKv.getQualifierLength());
            if (cmp == 0) {
                tableKeyValues[j++] = kv;
            } else if (cmp > 0) {
                tableKeyValues[j++] = null;
            } else {
                i++; // shouldn't happen - means unexpected KV in system table header row

> Add test cases to cover more index update failure scenarios
> -----------------------------------------------------------
>                 Key: PHOENIX-1147
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.0.0, 5.0.0
>            Reporter: Jeffrey Zhong
>            Assignee: Jeffrey Zhong
>         Attachments: Phoenix-1147-v1.patch
> Add one test to cover RegionServer being killed while index is begin updated
> Add steps to make sure UPSERT & SELECT should still work after index is disabled.

This message was sent by Atlassian JIRA

View raw message