This is an automated email from the ASF dual-hosted git repository.
gokcen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push:
new d14e3d0 PHOENIX-6055: Not matching index mutation error needs to
report more information rather than first expected mutation
d14e3d0 is described below
commit d14e3d0568b665c4bb6130d608cf36a0f3872933
Author: Gokcen Iskender <[email protected]>
AuthorDate: Tue Sep 22 16:02:10 2020 -0700
PHOENIX-6055: Not matching index mutation error needs to report more
information rather than first expected mutation
Signed-off-by: Gokcen Iskender <[email protected]>
---
.../org/apache/phoenix/coprocessor/IndexRebuildRegionScanner.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/IndexRebuildRegionScanner.java
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/IndexRebuildRegionScanner.java
index 621c8bd..f428543 100644
---
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/IndexRebuildRegionScanner.java
+++
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/IndexRebuildRegionScanner.java
@@ -785,9 +785,10 @@ public class IndexRebuildRegionScanner extends
GlobalIndexRegionScanner {
}
else {
byte[] dataKey = indexMaintainer.buildDataRowKey(new
ImmutableBytesWritable(indexRow.getRow()), viewConstants);
- String errorMsg = "Not matching index row";
+ String errorMsg = String.format("Not matching index row.
expectedIndex=%d. expectedMutationSize=%d. actualIndex=%d.
actualMutationSize=%d. expectedType=%s. actualType=%s",
+ expectedIndex, expectedSize, actualIndex, actualSize,
expected.getClass().getName(), (actualIndex < actualSize ?
actual.getClass().getName() : "null"));
logToIndexToolOutputTable(dataKey, indexRow.getRow(),
- getTimestamp(expectedMutationList.get(0)), 0L,
errorMsg, isBeforeRebuild,
+ getTimestamp(expected), (actualIndex < actualSize ?
getTimestamp(actual): 0L), errorMsg, isBeforeRebuild,
INVALID_ROW);
}
verificationPhaseResult.setInvalidIndexRowCount(verificationPhaseResult.getInvalidIndexRowCount()
+ 1);