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

Add option to the nats resolver to hard delete the jwt instead of renaming them to .deleted. #3782

Closed
JulienVdG opened this issue Jan 13, 2023 · 0 comments · Fixed by #3783
Closed

Comments

@JulienVdG
Copy link
Contributor

Feature Request

Add option to the nats resolver to hard delete the jwt instead of renaming them to .deleted.

I'll propose and MR to implement the option listed bellow.

Use Case:

We manage the accounts in our database so if we want to recover them we can use the database so we don't need the copy on disk.
We can do some manual (or cron) cleanup but as the nats code already has an HardDelete option internally, why not expose it to the configuration.

Proposed Change:

Add an option in the resolver config, for instance: hard_delete: bool.

Who Benefits From The Change(s)?

Any user that do not need the .deleted files.

Alternative Approaches

Overloading allow_delete: hard_delete but that may be problematic for the parser and backward compatibility

derekcollison added a commit that referenced this issue Apr 6, 2023
 - [x] Link to issue, e.g. `Resolves #NNN`
 - [ ] Documentation added (if applicable)
 - [ ] Tests added
- [x] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [x] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
 - [x] Build is green in Travis CI
- [x] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)

Resolves #3782

### Changes proposed in this pull request:

- Add hard_delete option in the resolver config and use it to set the
deleteType in NewDirAccResolver

/cc @nats-io/core
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 a pull request may close this issue.

2 participants