Skip to content
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

persistent logger (for bucket notifications) - don't log rename ENOENT if there were no failures #8765

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alphaprinz
Copy link
Contributor

Explain the changes

  1. If there were no failures during active persistent logger processing, the rename for the active failure file fails (because it's not there). Scale have opened a bug for this log.
    This PR changes the rename to not log ENOENT in case there were no failures.
    Let me know if you have other ideas.

Issues: Fixed #xxx / Gap #xxx

  1. Error messages in noobaa.log are misguiding #8762

Testing Instructions:

  1. Run notifications with one successful notifications. No WARN for renaming of active failure log file should be logged.
  • Doc added/updated
  • Tests added

@alphaprinz alphaprinz changed the title persistent logger (for bucket notifications) - don't log rename ENOEnT if there were no failures persistent logger (for bucket notifications) - don't log rename ENOENT if there were no failures Feb 4, 2025
@@ -198,7 +198,7 @@ class PersistentLogger {

try {
// Finally replace the current active so as to consume them in the next iteration
await failure_log._replace_active();
await failure_log._replace_active(!result);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should log ENOENT if the last processed journal (aka log) in a journal namespace was not deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the not-delete file needs to be replaced. (That's what I understand, correct me if I'm wrong. In my use case I always delete the the processed files.)

…T if there were no failures

Signed-off-by: Amit Prinz Setter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants