Add auto-repair options for broken AOF tail on startup#7
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c59ae6e67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #ifndef _REDIS_H | ||
| #define _REDIS_H |
There was a problem hiding this comment.
Restore double-underscore include guard
This change switches the include guard to _REDIS_H, but the repository compliance rules in /workspace/redis-combined-codex/AGENTS.md (Rule 3: “Header Files Must Use Double-Underscore Include Guards”) require #ifndef __FILENAME_H/#define __FILENAME_H. Keeping the single-underscore guard will violate the documented repo standard and should be treated as a compliance failure for any file under this scope.
Useful? React with 👍 / 👎.
| if (ret == AOF_OPEN_ERR || ret == AOF_FAILED || ret == AOF_BROKEN_RECOVERED) { | ||
| goto cleanup; |
There was a problem hiding this comment.
Avoid treating recovered AOF as fatal in base load
When aof-load-broken successfully recovers the base AOF and it is the last file, loadAppendOnlyFiles will still jump to cleanup because AOF_BROKEN_RECOVERED is included in this fatal condition. That exits before server.aof_current_size and server.aof_rewrite_base_size are initialized later in the function, leaving them at defaults (e.g., 0). This can skew INFO output and rewrite thresholds after a recovered startup. The recovered case should continue through the normal post-load initialization.
Useful? React with 👍 / 👎.
Benchmark PR from agentic-review-benchmarks#7