1
0
mirror of https://github.com/apple/foundationdb.git synced 2025-05-19 20:52:26 +08:00

Handle ascii special characters

This commit is contained in:
Meng Xu 2021-08-01 01:50:33 +00:00
parent b930faf520
commit 9e4bee9e30

@ -127,7 +127,7 @@ struct DecodeParams {
s.append(", endVersionFilter: ").append(std::to_string(endVersionFilter)); s.append(", endVersionFilter: ").append(std::to_string(endVersionFilter));
} }
if (!prefix.empty()) { if (!prefix.empty()) {
s.append(", KeyPrefix: ").append(printable(prefix)); s.append(", KeyPrefix: ").append(printable(KeyRef(prefix)));
} }
return s; return s;
} }
@ -594,10 +594,10 @@ ACTOR Future<Void> decode_logs(DecodeParams params) {
if (!print) { if (!print) {
if (isSingleKeyMutation((MutationRef::Type)m.type)) { if (isSingleKeyMutation((MutationRef::Type)m.type)) {
print = m.param1.startsWith(params.prefix); print = m.param1.startsWith(StringRef(params.prefix));
} else if (m.type == MutationRef::ClearRange) { } else if (m.type == MutationRef::ClearRange) {
KeyRange range(KeyRangeRef(m.param1, m.param2)); KeyRange range(KeyRangeRef(m.param1, m.param2));
print = range.contains(params.prefix); print = range.contains(StringRef(params.prefix));
} else { } else {
ASSERT(false); ASSERT(false);
} }