DomGarguilo commented on code in PR #3431:
URL: https://github.com/apache/accumulo/pull/3431#discussion_r1206978775
##########
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:
Not sure if it would be helpful to include more info in these new exception
messages but if so, we could do something like this:
```java
Optional<Text> badSplit = splits.stream()
.filter(split -> !extent.contains(split) ||
split.equals(extent.endRow())).findAny();
if (badSplit.isPresent()) {
Text split = badSplit.orElseThrow();
throw new ThriftTableOperationException(tableId.canonical(), null, tableOp,
TableOperationExceptionType.OTHER,
"Split '" + split + "' is outside bounds of tablet or equal to the
tablets endrow '"
+ extent.endRow() + "'");
}
```
Similar approach could apply to the other exception as well.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]