infraio commented on a change in pull request #718: HBASE-23155 May NPE when
concurrent AsyncNonMetaRegionLocator#updateC…
URL: https://github.com/apache/hbase/pull/718#discussion_r334308253
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNonMetaRegionLocator.java
##########
@@ -399,4 +399,14 @@ public void testLocateBeforeInOnlyRegion() throws
IOException, InterruptedExcept
assertArrayEquals(loc.getRegion().getStartKey(), EMPTY_START_ROW);
assertArrayEquals(loc.getRegion().getEndKey(), EMPTY_END_ROW);
}
+
+ @Test
+ public void testConcurrentUpdateCachedLocationOnError() throws Exception {
+ createSingleRegionTable();
+ HRegionLocation loc =
+ getDefaultRegionLocation(TABLE_NAME, EMPTY_START_ROW,
RegionLocateType.CURRENT, false)
+ .get();
+ IntStream.range(0, 100).parallel()
Review comment:
The updateCachedLocationOnError will produce a null RegionLocation.
----------------------------------------------------------------
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