Source:
<code>private void filterIndexCheckerMutations(Map<TableInfo, List<Mutation>> mutationMap, Map<TableInfo, List<Mutation>> unverifiedIndexMutations, Map<TableInfo, List<Mutation>> verifiedOrDeletedIndexMutations) throws SQLException { Iterator<Entry<TableInfo, List<Mutation>>> mapIter = mutationMap.entrySet().iterator(); while (mapIter.hasNext()) { Entry<TableInfo, List<Mutation>> pair = mapIter.next(); TableInfo tableInfo = pair.getKey(); PTable logicalTable = tableInfo.getPTable(); if (tableInfo.getOrigTableRef().getTable().isImmutableRows() && IndexUtil.isGlobalIndexCheckerEnabled(connection, tableInfo.getHTableName())) { byte[] emptyCF = SchemaUtil.getEmptyColumnFamily(logicalTable); byte[] emptyCQ = EncodedColumnsUtil.getEmptyKeyValueInfo(logicalTable).getFirst(); List<Mutation> mutations = pair.getValue(); for (Mutation m : mutations) { if (m == null) { continue; } if (m instanceof Delete) { Put put = new Put(m.getRow()); put.addColumn(emptyCF, emptyCQ, IndexRegionObserver.getMaxTimestamp(m), IndexRegionObserver.UNVERIFIED_BYTES); addToMap(unverifiedIndexMutations, tableInfo, put); addToMap(verifiedOrDeletedIndexMutations, tableInfo, m); } else if (m instanceof Put) { long timestamp = IndexRegionObserver.getMaxTimestamp(m); Put unverifiedPut = new Put(m.getRow()); unverifiedPut.addColumn(emptyCF, emptyCQ, timestamp, IndexRegionObserver.UNVERIFIED_BYTES); addToMap(unverifiedIndexMutations, tableInfo, unverifiedPut); ((Put) m).addColumn(emptyCF, emptyCQ, timestamp, IndexRegionObserver.VERIFIED_BYTES); <START> addToMap(verifiedOrDeletedIndexMutations, tableInfo, m); <END> } else { addToMap(unverifiedIndexMutations, tableInfo, m); } } mapIter.remove(); } } }</code><technical_language>empty column is part of mutation this moment "x". remove add new patch for PHOENIX-5539 does</technical_language>

Target:
private void filterIndexCheckerMutations(Map<TableInfo, List<Mutation>> mutationMap, Map<TableInfo, List<Mutation>> unverifiedIndexMutations, Map<TableInfo, List<Mutation>> verifiedOrDeletedIndexMutations) throws SQLException { Iterator<Entry<TableInfo, List<Mutation>>> mapIter = mutationMap.entrySet().iterator(); while (mapIter.hasNext()) { Entry<TableInfo, List<Mutation>> pair = mapIter.next(); TableInfo tableInfo = pair.getKey(); PTable logicalTable = tableInfo.getPTable(); if (tableInfo.getOrigTableRef().getTable().isImmutableRows() && IndexUtil.isGlobalIndexCheckerEnabled(connection, tableInfo.getHTableName())) { byte[] emptyCF = SchemaUtil.getEmptyColumnFamily(logicalTable); byte[] emptyCQ = EncodedColumnsUtil.getEmptyKeyValueInfo(logicalTable).getFirst(); List<Mutation> mutations = pair.getValue(); for (Mutation m : mutations) { if (m == null) { continue; } if (m instanceof Delete) { Put put = new Put(m.getRow()); put.addColumn(emptyCF, emptyCQ, IndexRegionObserver.getMaxTimestamp(m), IndexRegionObserver.UNVERIFIED_BYTES); addToMap(unverifiedIndexMutations, tableInfo, put); addToMap(verifiedOrDeletedIndexMutations, tableInfo, m); } else if (m instanceof Put) { long timestamp = IndexRegionObserver.getMaxTimestamp(m); Put unverifiedPut = new Put(m.getRow()); unverifiedPut.addColumn(emptyCF, emptyCQ, timestamp, IndexRegionObserver.UNVERIFIED_BYTES); addToMap(unverifiedIndexMutations, tableInfo, unverifiedPut); IndexRegionObserver.removeEmptyColumn(m, emptyCF, emptyCQ); ((Put) m).addColumn(emptyCF, emptyCQ, timestamp, IndexRegionObserver.VERIFIED_BYTES); addToMap(verifiedOrDeletedIndexMutations, tableInfo, m); } else { addToMap(unverifiedIndexMutations, tableInfo, m); } } mapIter.remove(); } } }