You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/10/11 20:17:49 UTC

[GitHub] [accumulo] ctubbsii commented on a diff in pull request #3014: fixes #3006 bug with concurrent merge and bulk import

ctubbsii commented on code in PR #3014:
URL: https://github.com/apache/accumulo/pull/3014#discussion_r992740801


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/ConcurrentKeyExtentCache.java:
##########
@@ -120,12 +125,24 @@ public KeyExtent lookup(Text row) {
 
         for (Text lookupRow : lookupRows) {
           if (getFromCache(lookupRow) == null) {
-            Iterator<KeyExtent> iter = lookupExtents(lookupRow).iterator();
-            while (iter.hasNext()) {
-              KeyExtent ke2 = iter.next();
-              if (inCache(ke2))
+            while (true) {
+              try {
+                Iterator<KeyExtent> iter = lookupExtents(lookupRow).iterator();
+                while (iter.hasNext()) {
+                  KeyExtent ke2 = iter.next();
+                  if (inCache(ke2))
+                    break;
+                  updateCache(ke2);
+                }
                 break;
-              updateCache(ke2);
+              } catch (TabletDeletedException tde) {
+                // tablets were merged away in the table, start over and try again
+                log.debug(
+                    "While trying to obtain a tablet location for bulk import a tablet was "
+                        + "deleted.   This can be caused by a concurrent merge tablet "
+                        + "operation.  If so its of no concern, otherwise it could be a problem.",

Review Comment:
   Suggest getting rid of some of these extra spaces after the periods, and other small punctuation/grammar:
   
   ```suggestion
                       "While trying to obtain a tablet location for bulk import, a tablet was "
                           + "deleted. If this was caused by a concurrent merge tablet "
                           + "operation, this is okay. Otherwise, it could be a problem.",
   ```



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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org