Skip to content

fix!: fallback to the root mountpoint when no matching mountpoints found #616

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

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

Conversation

kricsleo
Copy link
Member

resolves #336

@kricsleo kricsleo requested a review from pi0 as a code owner April 11, 2025 09:00
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.00%. Comparing base (70310f9) to head (3e2f48d).
Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #616   +/-   ##
=======================================
  Coverage   59.99%   60.00%           
=======================================
  Files          42       42           
  Lines        3657     3735   +78     
  Branches      590      602   +12     
=======================================
+ Hits         2194     2241   +47     
- Misses       1460     1491   +31     
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks, this is a valid fix however since risky (some usage might have been depending on faulty behavior and this can cause data loss) we should do it as a major version.

@pi0 pi0 changed the title fix: fallback to the root mountpoint when no matching mountpoints found fix!: fallback to the root mountpoint when no matching mountpoints found Apr 13, 2025
@pi0 pi0 added the breaking label Apr 13, 2025
@ToBinio
Copy link
Contributor

ToBinio commented Jul 5, 2025

Hi,
I just did a small deep dive into the clear function because of #642 (comment) and #638 (comment)

Is it really the best idea to delete the whole DB if I enter a too precise prefix? Isn't that kinda backwards?
I also don't think this solves #336 since the behaviors still differ... getKeys returns the expected subset and clear nukes the whole storage


getMounts(base, false).map(async (m) => {

I would suggest having getMounts(base, true) in clear and letting the drivers handle only deleting a subset of data.
Some drivers e.g. redis would already handle that

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.

Inconsistency between clear and getKeys
3 participants