gavinchou opened a new pull request, #68457:
URL: https://github.com/apache/doris/pull/68457
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
A full audit of `keys.h`, `keys.cpp`, and their Cloud unit tests found that
the key builders include the intended fixed family prefixes and infixes,
including `txn/tso_fence` and the 0x01/0x03 `meta/table_stream_offset` layouts.
However, several comments were stale, and some tests could pass without
validating the documented contract:
- HTTP fixtures derived expected bytes from the builder under test or did
not prove that every registered key type had a fixture.
- A rowset-tmp test passed the wrong key wrapper through an implicit
cross-wrapper conversion, and a tablet ordering test changed `index_id` while
claiming to test `tablet_id`.
- The versionstamp HTTP test only matched the bytes before the versionstamp.
- Snapshot and versioned decoders accepted some truncated, trailing, or
incorrectly tagged fields.
This change aligns the key-scheme comments, makes cross-key wrapper
conversions explicit, adds independent byte-for-byte golden coverage, checks
HTTP fixture/registry parity, and validates decoded field tags and exact
schemas. It also adds direct coverage for TSO fence, both Table Stream
keyspaces and prefixes, MOW tablet jobs, storage vaults, schema dictionaries,
and sentinel delete-bitmap lock ordering.
### Release note
None
### Check List (For Author)
- Test
- [ ] Regression test
- [x] Unit Test
- Cloud ASAN `keys_test`
- Cloud ASAN `http_encode_key_test`
- Cloud ASAN `codec_test`
- Cloud ASAN `meta_service_test:*TableStream*`
- [ ] Manual test
- [ ] No need to test or manual test.
- Behavior changed:
- [x] Yes. Malformed metadata keys with invalid field tags, trailing
fields, or truncated fields are now rejected.
- [ ] No.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]