github-actions[bot] commented on code in PR #68457:
URL: https://github.com/apache/doris/pull/68457#discussion_r4086776691


##########
cloud/src/meta-store/keys.cpp:
##########
@@ -1024,6 +1024,7 @@ bool decode_table_version_key(std::string_view* in, 
int64_t* table_id, Versionst
             std::get<std::string>(std::get<0>(out[2])) != 
TABLE_VERSION_KEY_INFIX) {
             return false;
         }
+        (void)std::get<std::string>(std::get<0>(out[1]));

Review Comment:
   [P2] Validate the recorded tags for string-valued fields
   
   `decode_key` stores both byte strings and `Versionstamp::to_string()` in the 
same `std::string` variant alternative, so this cast does not prove that field 
1 used `BYTES_TAG`. Because a middle versionstamp consumes an END marker from 
the tail, a malformed key can use a versionstamp for `instance_id` and a normal 
versionstamp last (plus two tail END markers), still produce five components, 
satisfy the final-tag check, and return true. The analogous checks below—and 
the arbitrary `rowset_id` output—have the same gap. Please validate each 
field's recorded tag and add a versionstamp-tagged-string negative test.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to