You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by pb...@apache.org on 2018/12/03 19:41:54 UTC
[6/9] phoenix git commit: PHOENIX-4960 Write to table with global
index failed if meta of index changed (split, move, etc)
PHOENIX-4960 Write to table with global index failed if meta of index changed (split, move, etc)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/73483421
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/73483421
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/73483421
Branch: refs/heads/4.14-cdh5.14
Commit: 7348342153894b24df9cc3dfe6021c446df2d0c0
Parents: 60231fd
Author: Vincent Poon <vi...@apache.org>
Authored: Tue Oct 16 03:11:40 2018 +0100
Committer: Pedro Boado <pb...@apache.org>
Committed: Mon Dec 3 08:37:12 2018 +0000
----------------------------------------------------------------------
.../org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/73483421/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index ea72a01..68f8abf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -3902,6 +3902,10 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso
newKVs.remove(disableTimeStampKVIndex);
newKVs.set(indexStateKVIndex, KeyValueUtil.newKeyValue(key, TABLE_FAMILY_BYTES,
INDEX_STATE_BYTES, timeStamp, Bytes.toBytes(newState.getSerializedValue())));
+ } else if (disableTimeStampKVIndex == -1) { // clear disableTimestamp if client didn't pass it in
+ newKVs.add(KeyValueUtil.newKeyValue(key, TABLE_FAMILY_BYTES,
+ PhoenixDatabaseMetaData.INDEX_DISABLE_TIMESTAMP_BYTES, timeStamp, PLong.INSTANCE.toBytes(0)));
+ disableTimeStampKVIndex = newKVs.size() - 1;
}
} else if (newState == PIndexState.DISABLE) {
//reset the counter for pending disable when transitioning from PENDING_DISABLE to DISABLE