Repository navigation
storage: compare parsed timestamps for recovered chunk ordering - #12890
dpavlov2024 wants to merge 2 commits into
Conversation
Signed-off-by: Dmitri Pavlov <dpavlov@perforce.com>
Signed-off-by: Dmitri Pavlov <dpavlov@perforce.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
Fix
sort_chunk_cmp()so recovered chunks are actually ordered by timestamp.sort_chunk_cmp()marked a successful parse with-1, soif (ra != 0 || rb != 0)was true for two valid names and always fell through tostrcmp(); the timestamp comparison was dead code.strcmp()for a deterministic order.parse_stamp()now requires the whole filename to match, solegacy-1.0junk.flbis rejected as a timestamp.tests/internal/storage_sort.c(4 cases: numeric nsec, slot names, valid-vs-invalid/trailing junk, equal timestamps).This is deliberately independent of the file-slot pool work. It does change recovered-chunk ordering for stock chunks (numeric timestamp instead of lexical name order), but that is the comparator's documented intent. For pooled chunks the ordering key is last-write mtime, while fallback chunk names carry creation time, so mixed pooled/fallback ordering is best-effort.
Base: Fluent Bit
masterat984519cb.Testing
These results are from earlier validation of the same patch. Patch application and commit prefixes were verified on the current base.
flb-it-storage_sort: 4/4.FLB_ALL=Off) with the test target: rc 0.Notes
The timestamp branch was previously unreachable for valid pairs. The pool's
slot-NNNNNN-<ts>.flbnames benefit, but stockpid-<sec>.<nsec>.flbnames are fixed too (variable-width nsec and mixed PIDs).Summary by CodeRabbit