BinShi-SecularBird commented on a change in pull request #608: PHOENIX-5539 
Full row index write at the last write phase for mutable…
URL: https://github.com/apache/phoenix/pull/608#discussion_r339210400
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
 ##########
 @@ -555,33 +570,30 @@ private void 
prepareIndexMutations(ObserverContext<RegionCoprocessorEnvironment>
                   // add the VERIFIED cell, which is the empty cell
                   Mutation m = next.getFirst().getFirst();
                   boolean rebuild = 
PhoenixIndexMetaData.isIndexRebuild(m.getAttributesMap());
-                  long ts = getMaxTimestamp(m);
                   if (rebuild) {
                       if (m instanceof Put) {
+                          long ts = getMaxTimestamp(m);
+                          // Remove the empty column prepared by Index codec 
as we need to change its value
+                          removeEmptyColumn(m, emptyCF, emptyCQ);
 
 Review comment:
   It seems that we first remove the existing "empty" column from an array, the 
cell list of the column family, then add a new "empty" column. Is it necessary 
have an optimization here - replace the old cell with the new cell in place in 
the array?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to