From de331ba0809d3fe51192e916194a64a231776ca8 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Tue, 26 Jul 2022 13:10:31 -0700 Subject: [PATCH] Fix incorrect deserialization of FdbClientLogEvents::Event (#7707) We're trying to interpret an Optional here, but the python truthiness of self.get_bytes(1) is _always_ true, since it's non-empty. We need to look at the _contents_ of that byte instead. --- .../transaction_profiling_analyzer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/transaction_profiling_analyzer/transaction_profiling_analyzer.py b/contrib/transaction_profiling_analyzer/transaction_profiling_analyzer.py index e704cacb72..37b1132de8 100644 --- a/contrib/transaction_profiling_analyzer/transaction_profiling_analyzer.py +++ b/contrib/transaction_profiling_analyzer/transaction_profiling_analyzer.py @@ -194,7 +194,7 @@ class BaseInfo(object): if protocol_version >= PROTOCOL_VERSION_6_3: self.dc_id = bb.get_bytes_with_length() if protocol_version >= PROTOCOL_VERSION_7_1: - if bb.get_bytes(1): + if bb.get_bool(): self.tenant = bb.get_bytes_with_length() class GetVersionInfo(BaseInfo):