This is an automated email from the ASF dual-hosted git repository.
kadir pushed a commit to branch 4.14-HBase-1.4
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.14-HBase-1.4 by this push:
new dfbd4c0 PHOENIX-5478 IndexTool mapper task should not timeout
(addendum for start/close region operation)
dfbd4c0 is described below
commit dfbd4c0c2a5c812dec997a5276343954bf29be5e
Author: Kadir <[email protected]>
AuthorDate: Wed Oct 30 21:32:22 2019 -0700
PHOENIX-5478 IndexTool mapper task should not timeout (addendum for
start/close region operation)
---
.../phoenix/coprocessor/UngroupedAggregateRegionObserver.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
index e31c5dc..31bbbbe 100644
---
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
+++
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
@@ -1147,6 +1147,7 @@ public class UngroupedAggregateRegionObserver extends
BaseScannerRegionObserver
@Override
public boolean next(List<Cell> results) throws IOException {
int rowCount = 0;
+ region.startRegionOperation();
try {
byte[] uuidValue = ServerCacheClient.generateId();
synchronized (innerScanner) {
@@ -1196,9 +1197,7 @@ public class UngroupedAggregateRegionObserver extends
BaseScannerRegionObserver
LOGGER.error("IOException during rebuilding: " +
Throwables.getStackTraceAsString(e));
throw e;
} finally {
- if (!hasMore) {
- region.closeRegionOperation();
- }
+ region.closeRegionOperation();
}
byte[] rowCountBytes =
PLong.INSTANCE.toBytes(Long.valueOf(rowCount));
final KeyValue aggKeyValue =
KeyValueUtil.newKeyValue(UNGROUPED_AGG_ROW_KEY, SINGLE_COLUMN_FAMILY,
@@ -1216,7 +1215,6 @@ public class UngroupedAggregateRegionObserver extends
BaseScannerRegionObserver
private RegionScanner rebuildIndices(final RegionScanner innerScanner,
final Region region, final Scan scan,
final Configuration config) throws
IOException {
- region.startRegionOperation();
RegionScanner scanner = new IndexRebuildRegionScanner(innerScanner,
region, scan, config);
return scanner;
}