DomGarguilo commented on code in PR #5340:
URL: https://github.com/apache/accumulo/pull/5340#discussion_r2031968920
##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java:
##########
@@ -558,6 +559,26 @@ private static Optional<TServerInstance>
checkServer(ClientContext context, Stri
.map(address -> new TServerInstance(address,
stat.getEphemeralOwner()));
}
+ public static void validate(TabletMetadata tm) {
+ if (!tm.fetchedCols.contains(ColumnType.FILES) || !tm.sawPrevEndRow) {
Review Comment:
@ArbaazKhan1 and I tried out this suggestion and we were getting test
failures in `TabletMetadataTest`. This is the version of the code that worked
for me:
```java
public static void validate(TabletMetadata tm) {
if (!tm.fetchedCols.contains(ColumnType.FILES)) {
return;
}
Collection<StoredTabletFile> files = tm.getFiles();
if (files.isEmpty()) {
return;
}
if (!tm.fetchedCols.contains(ColumnType.PREV_ROW) ||
!tm.sawPrevEndRow()) {
return;
}
```
--
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]