You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/05/26 19:23:43 UTC

[GitHub] [accumulo] keith-turner commented on a diff in pull request #3431: adds validation to user split and new tests

keith-turner commented on code in PR #3431:
URL: https://github.com/apache/accumulo/pull/3431#discussion_r1207237717


##########
server/manager/src/main/java/org/apache/accumulo/manager/FateServiceHandler.java:
##########
@@ -740,6 +740,23 @@ public void executeFateOperation(TInfo tinfo, TCredentials c, long opid, FateOpe
             .map(ByteBufferUtil::toText).collect(Collectors.toCollection(TreeSet::new));
 
         KeyExtent extent = new KeyExtent(tableId, endRow, prevEndRow);
+
+        if (splits.stream()
+            .anyMatch(split -> !extent.contains(split) || split.equals(extent.endRow()))) {
+          throw new ThriftTableOperationException(tableId.canonical(), null, tableOp,
+              TableOperationExceptionType.OTHER,
+              "Split is outside bounds of tablet or equal to the tablets endrow");
+        }

Review Comment:
   >  if the split is very large it might not be helpful to include in the logs.
   
   I think logging them would be useful



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