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

fix: truncate should commit new meta to meta-server first #11319

Merged
merged 3 commits into from
May 5, 2023

Conversation

dantengsky
Copy link
Member

@dantengsky dantengsky commented May 5, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

truncate should commit the new meta to meta-server first.

the principle should be:

publish the new meta first, let the effects of truncate be visible to all the subsequent txs (and parallel txs while committing), and purge the data later(in a best-effort manner) if the purge option is specified.

also, please consider removing the purge option from truncate, since

  • it is not a safe operation, there is NO retention interval protection here
  • it is somehow incompatible with time travel features

Closes #issue

@vercel
Copy link

vercel bot commented May 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
databend ⬜️ Ignored (Inspect) May 5, 2023 10:10am

@mergify mergify bot added the pr-bugfix this PR patches a bug in codebase label May 5, 2023
@dantengsky dantengsky marked this pull request as ready for review May 5, 2023 10:37
@dantengsky dantengsky requested review from BohuTANG and zhyass May 5, 2023 10:37
@BohuTANG BohuTANG merged commit f053d6f into databendlabs:main May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants