From 55c03c79f4dc25df6025923adc1c54f08b0ebf4e Mon Sep 17 00:00:00 2001 From: Jonathan Diamond Date: Tue, 27 Aug 2024 15:15:36 -0700 Subject: [PATCH 1/2] Fix missing header return in _populate_available_source_ids --- python/fusion_engine_client/parsers/mixed_log_reader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/fusion_engine_client/parsers/mixed_log_reader.py b/python/fusion_engine_client/parsers/mixed_log_reader.py index 700117fa..c3e8c143 100644 --- a/python/fusion_engine_client/parsers/mixed_log_reader.py +++ b/python/fusion_engine_client/parsers/mixed_log_reader.py @@ -627,6 +627,8 @@ def get_available_source_ids(self) -> Set[int]: def _populate_available_source_ids(self, num_messages_to_read: int = 10): self.available_source_ids = set() + stored_return_header = self.return_header + self.return_header = True # Loop over all message types and read N of each type. for message_type in np.unique(self.index['type']): message_type = MessageType(message_type, raise_on_unrecognized=False) @@ -644,6 +646,7 @@ def _populate_available_source_ids(self, num_messages_to_read: int = 10): self.clear_filters() + self.return_header = stored_return_header self.rewind() def __iter__(self): From e219e97c152839edd1e325d1dd701b8f41279696 Mon Sep 17 00:00:00 2001 From: Jonathan Diamond Date: Tue, 27 Aug 2024 15:44:50 -0700 Subject: [PATCH 2/2] Add comment. --- python/fusion_engine_client/parsers/mixed_log_reader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/fusion_engine_client/parsers/mixed_log_reader.py b/python/fusion_engine_client/parsers/mixed_log_reader.py index c3e8c143..cba91259 100644 --- a/python/fusion_engine_client/parsers/mixed_log_reader.py +++ b/python/fusion_engine_client/parsers/mixed_log_reader.py @@ -627,6 +627,8 @@ def get_available_source_ids(self) -> Set[int]: def _populate_available_source_ids(self, num_messages_to_read: int = 10): self.available_source_ids = set() + # This function requires that the header is returned. Store the current + # `self.return_header` value. stored_return_header = self.return_header self.return_header = True # Loop over all message types and read N of each type.