Skip to content

Commit

Permalink
Fix the merging of borked lines with MFLOG
Browse files Browse the repository at this point in the history
In case there are borked lines in a log file, the current code would
not properly merge the logs because borked lines returned a datetime string
as a str and not as bytes like non-borked lines.
  • Loading branch information
romain-intel committed Sep 13, 2023
1 parent d18be77 commit ca01acf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metaflow/mflog/mflog.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def line_iter(logblob):
res = MFLogline(
False, None, MISSING_TIMESTAMP_STR, None, None, line, MISSING_TIMESTAMP
)
yield res.utc_tstamp_str, res
yield res.utc_tstamp_str.encode("utf-8"), res

# note that sorted() below should be a very cheap, often a O(n) operation
# because Python's Timsort is very fast for already sorted data.
Expand Down

0 comments on commit ca01acf

Please sign in to comment.