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] [Commented] (PHOENIX-1147) Add test cases to cover more index update failure scenarios
Date Wed, 06 Aug 2014 23:52:12 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14088483#comment-14088483
] 

James Taylor commented on PHOENIX-1147:
---------------------------------------

I don't think we want to do this change, as there's no relation between the index timestamp
and the table timestamp, so we're likely to send over the table every time. I can see there's
an issue, though. I think when we update the index state, we should also update the table
timestamp - just do a Put with the same info as before, but with the newer timestamp. That
way, you won't need this change (and the table won't be send over more often than necessary).

{code}
diff --git phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index 060b641..1a07e37 100644
--- phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -326,8 +326,16 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements
Coprocesso
             }
             builder.setReturnCode(MetaDataProtos.MutationCode.TABLE_ALREADY_EXISTS);
             builder.setMutationTime(currentTime);
+
             if (table.getTimeStamp() != tableTimeStamp) {
                 builder.setTable(PTableImpl.toProto(table));
+            } else {
+                for(PTable index : table.getIndexes()){
+                    if(index.getTimeStamp() != tableTimeStamp){
+                        builder.setTable(PTableImpl.toProto(table));
+                        break;
+                    }
+                }
             }
             done.run(builder.build());
             return;
{code}


> Add test cases to cover more index update failure scenarios
> -----------------------------------------------------------
>
>                 Key: PHOENIX-1147
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1147
>             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
(v6.2#6252)

Mime
View raw message