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/07/17 17:39:39 UTC

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

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


##########
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:
   This check should always pass because the de-serialization is always creating a range object using rows  and not keys.  Wonder if instead of always checking this at runtime, the validation of this assumption could be moved to a unit test somehow.



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