ctubbsii commented on code in PR #4085:
URL: https://github.com/apache/accumulo/pull/4085#discussion_r1433337998


##########
core/src/main/java/org/apache/accumulo/core/tabletserver/log/LogEntry.java:
##########
@@ -106,11 +112,10 @@ public static LogEntry fromMetaWalEntry(Entry<Key,Value> 
entry) {
     Preconditions.checkArgument(LogColumnFamily.NAME.equals(fam),
         "The provided metadata entry's column family is %s instead of %s", fam,
         LogColumnFamily.NAME);
-    String qualifier = entry.getKey().getColumnQualifier().toString();
-    String[] parts = qualifier.split("/", 2);
-    Preconditions.checkArgument(parts.length == 2 && parts[0].equals("-"),
-        "Malformed write-ahead log %s", qualifier);
-    return fromPath(parts[1]);
+    Text qualifier = entry.getKey().getColumnQualifier();
+    String[] parts = qualifier.toString().split("/", 2);
+    Preconditions.checkArgument(parts.length == 2, "Malformed write-ahead log 
%s", qualifier);

Review Comment:
   As far as I can tell, the `parts[0]` could contain `-` (current code) or 
`tserver:port` (previous version). I can't be sure about prior to that, but I 
believe there was an upgrade step that removed relative paths from WAL entries 
that would have rewritten anything that would be older than these two most 
recent versions.
   
   My concern about adding strict validation on the ignored part is that we 
could cause an unnecessary recovery failure. Accommodating variance in the part 
that doesn't matter by not validating its content avoids that.
   
   I just have a lot of uncertainty about the history of the various formats of 
these columns. I would prefer not to strictly validate the ignored part, and we 
just make sure we go through upgrade code for any future metadata schema 
changes.



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

Reply via email to