db_stress print TestMultiGet error value in hex (#10753)

Summary:
Without this fix, db_crashtest.py could fail with useless output such as: `UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 267: invalid start byte`

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10753

Reviewed By: hx235

Differential Revision: D39905809

Pulled By: ajkr

fbshipit-source-id: 50ba2cf20d206eeb168309cec137e827a34c8f0b
This commit is contained in:
Andrew Kryczka 2022-09-28 15:17:12 -07:00 committed by Facebook GitHub Bot
parent d2578ab195
commit b0d8ccbbca
1 changed files with 2 additions and 1 deletions

View File

@ -614,7 +614,8 @@ class NonBatchedOpsStressTest : public StressTest {
keys[i].ToString(true).c_str());
fprintf(stderr, "MultiGet returned value %s\n",
values[i].ToString(true).c_str());
fprintf(stderr, "Get returned value %s\n", value.c_str());
fprintf(stderr, "Get returned value %s\n",
Slice(value).ToString(true /* hex */).c_str());
is_consistent = false;
}
}