Skip to content

Add conditional deletes#427

Closed
ankrgyl wants to merge 3 commits into
apache:mainfrom
braintrustdata:conditional-delete
Closed

Add conditional deletes#427
ankrgyl wants to merge 3 commits into
apache:mainfrom
braintrustdata:conditional-delete

Conversation

@ankrgyl

@ankrgyl ankrgyl commented Jul 8, 2025

Copy link
Copy Markdown

Which issue does this PR close?

Closes #298

Rationale for this change

It's useful to have conditional deletes while implementing concurrent primitives on object stores, like distributed locks.

What changes are included in this PR?

Mirror the conditional put implementation to support conditional deletes

Are there any user-facing changes?

Yes a new delete_opts method that accepts deletion opts.

@tustvold

tustvold commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

Thank you for this, I think this needs some tests. I only see tests for InMemory

@ankrgyl

ankrgyl commented Jul 9, 2025

Copy link
Copy Markdown
Author

Yep very happy to fill in more tests. Do you just generally run them against your own object storage accounts?

@Xuanwo

Xuanwo commented Jul 9, 2025

Copy link
Copy Markdown
Member

As far as I know, aws only support delete with if match on s3 express.

@ankrgyl

ankrgyl commented Jul 9, 2025

Copy link
Copy Markdown
Author

As far as I know, aws only support delete with if match on s3 express.

Ah yes that is correct!

@rbehjati

rbehjati commented Oct 3, 2025

Copy link
Copy Markdown

It seems that as of September 16th, if-match is supported for S3 general purpose buckets (source). Can the work on this PR be continued now?

@ankrgyl

ankrgyl commented Oct 5, 2025

Copy link
Copy Markdown
Author

It seems that as of September 16th, if-match is supported for S3 general purpose buckets (source). Can the work on this PR be continued now?

Feel free to take it over!

@pdeva

pdeva commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

i took inspiration from this and created a fresh PR here #610

@crepererum

Copy link
Copy Markdown
Contributor

Discussion & impl. continues in #610. Thank you @ankrgyl for your initial work on this feature!

@crepererum crepererum closed this Feb 10, 2026
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.

add support for conditional deletes

6 participants