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

ASF GitHub Bot commented on PHOENIX-6386:
-----------------------------------------

virajjasani commented on a change in pull request #1144:
URL: https://github.com/apache/phoenix/pull/1144#discussion_r579814684



##########
File path: 
phoenix-core/src/main/java/org/apache/phoenix/mapreduce/FormatToBytesWritableMapper.java
##########
@@ -176,17 +179,20 @@ protected void map(LongWritable key, Text value, Context 
context) throws IOExcep
             while (uncommittedDataIterator.hasNext()) {
                 Pair<byte[], List<Cell>> kvPair = 
uncommittedDataIterator.next();
                 List<Cell> keyValueList = kvPair.getSecond();
-                keyValueList = preUpdateProcessor.preUpsert(kvPair.getFirst(), 
keyValueList);
-                byte[] first = kvPair.getFirst();
+                byte[] tableName = kvPair.getFirst();
+                keyValueList = preUpdateProcessor.preUpsert(tableName, 
keyValueList);
                 // Create a list of KV for each table
                 for (int i = 0; i < tableNames.size(); i++) {
-                    if (Bytes.compareTo(Bytes.toBytes(tableNames.get(i)), 
first) == 0) {
+                    if (Bytes.compareTo(Bytes.toBytes(tableNames.get(i)), 
tableName) == 0) {
                         if (!map.containsKey(i)) {
                             map.put(i, new ArrayList<Cell>());
                         }
-                        List<Cell> list = map.get(i);
+                        List<Cell> cellsForTable = map.get(i);
+                        if(indexStatusUpdaters[i] != null) {
+                            indexStatusUpdaters[i].setVerfied(keyValueList);
+                        }

Review comment:
       This should solve the problem of verifying index rows right?




----------------------------------------------------------------
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]


> Bulkload generates unverified index rows
> ----------------------------------------
>
>                 Key: PHOENIX-6386
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6386
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5.1.0, 4.16.0
>            Reporter: Istvan Toth
>            Assignee: Istvan Toth
>            Priority: Major
>
> Bulkload sets the index status cell of the generated global index rows to the 
> default 'x' value.
> As a result, all such indexes are treated as unverified, and the first access 
> will generate index verification load, and be very slow.
> We should generate the index rows with the VERIFIED state.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to