[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
PHOENIX-4619 Process transactional updates to local index on server-side


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f32b32b3
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f32b32b3
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f32b32b3

Branch: refs/heads/5.x-HBase-2.0
Commit: f32b32b30df689d5fa79ca1b10579ac6a08e9614
Parents: 2689b0a
Author: James Taylor 
Authored: Sat Mar 17 12:52:38 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 14:39:54 2018 -0700

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   1 +
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 450 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   9 +-
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  39 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 437 +---
 .../query/ConnectionQueryServicesImpl.java  |   9 +-
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   3 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   8 +-
 29 files changed, 786 insertions(+), 1147 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f32b32b3/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 48268dd..e10bf8f 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f32b32b3/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
index 85a26f9..9764ee7 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.jav

[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread pboado
PHOENIX-4619 Process transactional updates to local index on server-side


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/c1827f24
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/c1827f24
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/c1827f24

Branch: refs/heads/4.x-cdh5.14
Commit: c1827f2408fa118be269efc79eaadacd6de48bc9
Parents: 03fedf6
Author: James Taylor 
Authored: Sat Mar 17 19:52:38 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:42 2018 +

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
index d520824..1db9787 100644
--- 
a/phoenix-core/src/it/java/

[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread pboado
PHOENIX-4619 Process transactional updates to local index on server-side


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/c1827f24
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/c1827f24
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/c1827f24

Branch: refs/heads/4.x-cdh5.13
Commit: c1827f2408fa118be269efc79eaadacd6de48bc9
Parents: 03fedf6
Author: James Taylor 
Authored: Sat Mar 17 19:52:38 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:42 2018 +

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
index d520824..1db9787 100644
--- 
a/phoenix-core/src/it/java/

[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread pboado
PHOENIX-4619 Process transactional updates to local index on server-side


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/c1827f24
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/c1827f24
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/c1827f24

Branch: refs/heads/4.x-cdh5.12
Commit: c1827f2408fa118be269efc79eaadacd6de48bc9
Parents: 03fedf6
Author: James Taylor 
Authored: Sat Mar 17 19:52:38 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:42 2018 +

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
index d520824..1db9787 100644
--- 
a/phoenix-core/src/it/java/

[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
PHOENIX-4619 Process transactional updates to local index on server-side


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/e301ec2f
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/e301ec2f
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/e301ec2f

Branch: refs/heads/master
Commit: e301ec2f9d731bdc7d529a7f08ec35b684efe419
Parents: e3889e2
Author: James Taylor 
Authored: Sat Mar 17 12:52:38 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 11:46:32 2018 -0700

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e301ec2f/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator>> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e301ec2f/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
index d520824..1db9787 100644
--- 
a/phoenix-core/src/it/java/org/