github-actions[bot] commented on code in PR #70519:
URL: https://github.com/apache/doris/pull/70519#discussion_r4549069291
##########
be/src/storage/key/row_key_encoder.cpp:
##########
@@ -64,8 +64,7 @@ void full_encode_ascending(const IColumn& column, size_t pos,
size_t length, std
// unpadded. Padding straight into the key gives the same bytes.
StorageLayout<FT>::append_padded(value, length, buf);
} else {
- const Slice slice(value.data, value.size);
- KeyCoderTraits<FT>::full_encode_ascending(&slice, buf);
+ RowKeyEncoder::full_encode_string(value.data, value.size, buf);
Review Comment:
[P1] Version the full-key format before changing persisted bytes
This unconditionally changes persisted primary-key/index-bound bytes, but
existing rowsets are still read without an encoding discriminator. For example,
a one-column MoW VARCHAR key with bytes `61 03` was stored as `026103` and is
now probed as `02610303`. `BaseTablet::lookup_row_key()` rejects that probe
against the old singleton segment's maximum;
`SegmentIterator::_lookup_ordinal_from_pk_index()` similarly returns past the
segment, so upgraded point/range reads miss the row. An upsert's
`calc_segment_delete_bitmap()` also probes the newly encoded index key against
old rowsets and fails to mark the previous row deleted. Please version/gate the
representation and make readers, bounds comparisons and write/delete-bitmap
probes compatible with old rowsets, with an upgrade read/update regression
case; the added tests only create fresh-format segments.
--
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]