Skip to content

[CLN] Warn on log pull failure instead of error #4435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 5, 2025

Conversation

HammadB
Copy link
Collaborator

@HammadB HammadB commented May 3, 2025

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • There are valid cases for this log pull to fail, it is not an invariant violation as stated.
    • If the log is failed to be updated with the latest compaction offset (Which is best-effort), but the sysdb was, the log may schedule a collection for compaction that has no records outstanding. This leads to hitting this case, which is valid. In the future we could repair the log.
    • Forked collections will also run into this as the fork() call may copy the old log offset, but a compaction happens after, this leads to them disagreeing but progression is always forward, it manifests as the same issue above which is that the log is behind the sysdb.
    • Keeping this as a warn because its worth monitoring this as it implies log service may be failing to get updated. Or that the fork race is commonly copying unnecessary data.
  • New functionality
    • None

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

None

Copy link

github-actions bot commented May 3, 2025

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@HammadB HammadB merged commit dd6d176 into main May 5, 2025
70 checks passed
chroma-droid pushed a commit that referenced this pull request May 5, 2025
## Description of changes

_Summarize the changes made by this PR._

- Improvements & Bug fixes
- There are valid cases for this log pull to fail, it is not an
invariant violation as stated.
- If the log is failed to be updated with the latest compaction offset
(Which is best-effort), but the sysdb was, the log may schedule a
collection for compaction that has no records outstanding. This leads to
hitting this case, which is valid. In the future we could repair the
log.
- Forked collections will also run into this as the fork() call may copy
the old log offset, but a compaction happens after, this leads to them
disagreeing but progression is always forward, it manifests as the same
issue above which is that the log is behind the sysdb.
- Keeping this as a `warn` because its worth monitoring this as it
implies log service may be failing to get updated. Or that the fork race
is commonly copying unnecessary data.
- New functionality
  - None

## Test plan
_How are these changes tested?_
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
None
eculver added a commit that referenced this pull request May 6, 2025
This PR cherry-picks the commit dd6d176
onto rc/2025-05-02. If there are unresolved conflicts, please resolve
them manually.

Co-authored-by: Hammad Bashir <[email protected]>
Co-authored-by: Evan Culver <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant