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

[FEATURE REQUEST] maxArchiveSize and archivedExpirationInDays should be configurable at the server level #534

Closed
wants to merge 2 commits into from

Conversation

ghstahl
Copy link

@ghstahl ghstahl commented Sep 1, 2022

@@ -869,6 +896,9 @@ return redis.status_reply("OK")`)
// Archive sends the given task to archive, attaching the error message to the task.
// It also trims the archive by timestamp and set size.
func (r *RDB) Archive(ctx context.Context, msg *base.TaskMessage, errMsg string) error {
if *(r.config.MaxArchiveSize) <= 0 {
return nil
Copy link

@bojanz bojanz Aug 30, 2023

Choose a reason for hiding this comment

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

Won't this just leave the task in the original queue? We probably want to delete it instead?

r.DeleteTask() doesn't work on active tasks right now, so perhaps we need a hint from @hibiken

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine as the author intended that setting anything < 1 should never delete anything. But, another issue is that if the configs are set < 0, a default value of 1 is used that will trigger an archive which is not intended behavior.

@kamikazechaser
Copy link
Collaborator

@ghstahl Thanks for the PR. Even though it was opened a long time ago, I'd like to see it merged before we merge #743. Are you in a position to update this PR and fix conflicts (I don't have permissions to push to forks)?

@kamikazechaser
Copy link
Collaborator

Close this as stale. Another PR should be opened in favor of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants