Repository navigation
fix: select gather log files by time range overlap and support 14-digit obproxy timestamps - #1270
Merged
Merged
Conversation
…it obproxy timestamps - obproxy: parse 14-digit rotated log timestamps (obproxy.log.YYYYMMDDHHMMSS); the 17-digit observer pattern made every rotated obproxy log be skipped - base/observer: keep a log file when [previous rotation, rotation time] overlaps [from, to] instead of requiring the rotation time inside the range; the current log file is no longer collected unconditionally - add regression tests for obproxy and observer time filtering Closes oceanbase#1269
hidb4ai
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1269.
gather obproxy_logwith--from/--todid not collect the logs of the requested time range. Observer log gathering also missed the file that covers the end of the requested range.ObproxyGatherLogOnNodenow overrides_parse_timestamp_from_filename/_get_log_type, so it recognizes theYYYYMMDDHHMMSSformat used in names likeobproxy.log.20261111212023. Before this change it used the 17-digit observer pattern, so no rotated obproxy log could be parsed and all of them were skipped.BaseGatherLogOnNode._filter_logs_by_time_rangeis used by both obproxy (through_get_logfile_names_by_time) and observer (_filter_logs_by_time).start <= to and end >= from. The start time of the oldest rotated file and the end time of the current file are unknown, so they are treated as unbounded..gz/.zst) are grouped with the uncompressed files of the same log type and share the same time chain._is_file_in_time_range.The
--recent_countlogic is unchanged. Because obproxy timestamps are now parsed correctly, keeping the most recent N files per log type also gives the right result for obproxy.Validation
test/common/test_gather_log_time_filter.pywith 8 test cases, covering:.zst), separate grouping for thealert/subdirectory, and a range before the first rotation.python -m unittest discover -s test/common -p 'test_*.py': all 122 tests pass (Python 3.11).black --check -S -l 256 .(black 24.8.0, same as CI): passes.python workflow_data/check_py_files.py .: passes.git diff --check: passes.Closes #1269