You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2023/07/17 15:35:37 UTC

[GitHub] [accumulo] dlmarion commented on a diff in pull request #3621: Move range validation to AbstractTabletFile

dlmarion commented on code in PR #3621:
URL: https://github.com/apache/accumulo/pull/3621#discussion_r1265551492


##########
core/src/main/java/org/apache/accumulo/core/metadata/StoredTabletFile.java:
##########
@@ -215,14 +198,9 @@ public static String serialize(String path) {
   }
 
   public static String serialize(String path, Range range) {
+    requireRowRange(range);

Review Comment:
   `errorprone` comment here too



##########
core/src/main/java/org/apache/accumulo/core/metadata/StoredTabletFile.java:
##########
@@ -151,7 +150,11 @@ public String toString() {
    * Validates that the provided metadata string for the StoredTabletFile is valid.
    */
   public static void validate(String metadataEntry) {
+    final TabletFileCq tabletFileCq = deserialize(metadataEntry);
+    // Validate the path
     ReferencedTabletFile.parsePath(deserialize(metadataEntry).path);
+    // Validate the range
+    requireRowRange(tabletFileCq.range);

Review Comment:
   `errorprone` might complain that you are not using the return value.



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