Skip to content

feat!: disable auto-cleanup by default#4118

Closed
wjones127 wants to merge 2 commits intolance-format:mainfrom
wjones127:feat/auto-cleanup-off-by-default
Closed

feat!: disable auto-cleanup by default#4118
wjones127 wants to merge 2 commits intolance-format:mainfrom
wjones127:feat/auto-cleanup-off-by-default

Conversation

@wjones127
Copy link
Copy Markdown
Contributor

@wjones127 wjones127 commented Jul 1, 2025

BREAKING CHANGE: disables auto-cleanup by default.

Summary

Changes WriteParams default to disable auto-cleanup by default, addressing community feedback in issue #3854.

Changes Made

  • WriteParams::default() now sets auto_cleanup: None instead of Some(AutoCleanupParams::default())
  • Updated existing test - Modified auto_cleanup_old_versions test to explicitly enable auto-cleanup since it no longer works with default params
  • Added new test - test_auto_cleanup_default_disabled() verifies the new default behavior
  • Enhanced test infrastructure - Extended MockDatasetFixture to support auto-cleanup configuration

Breaking Change Context

Auto-cleanup was previously enabled by default (PR #3572), but community feedback indicated this was unexpected behavior:

  • Users didn't expect write queries to be delayed by cleanup operations
  • Users expected version history to be preserved indefinitely unless explicitly configured
  • The change was seen as a breaking change that could delete data unexpectedly

Test Results

  • ✅ All auto-cleanup tests pass
  • ✅ All write tests pass
  • ✅ All cleanup tests pass
  • ✅ Code formatting verified

API Impact

  • Rust: WriteParams::default() now has auto_cleanup: None
  • Python: No changes needed - already defaults to auto_cleanup_options: None
  • Existing datasets: Continue to work with their configured auto-cleanup settings

Users who want auto-cleanup can now explicitly opt-in by:

WriteParams {
    auto_cleanup: Some(AutoCleanupParams::default()),
    ..Default::default()
}

Fixes #3854

🤖 Generated with Claude Code

@github-actions github-actions Bot added the enhancement New feature or request label Jul 1, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.99%. Comparing base (5c98e47) to head (d04d8a0).
Report is 38 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4118      +/-   ##
==========================================
- Coverage   78.68%   77.99%   -0.70%     
==========================================
  Files         285      301      +16     
  Lines      113527   102889   -10638     
  Branches   113527   102889   -10638     
==========================================
- Hits        89328    80247    -9081     
+ Misses      20772    19685    -1087     
+ Partials     3427     2957     -470     
Flag Coverage Δ
unittests 77.99% <100.00%> (-0.70%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@wjones127 wjones127 changed the title feat: disable auto-cleanup by default feat!: disable auto-cleanup by default Jul 1, 2025
wjones127 and others added 2 commits July 1, 2025 14:07
Changes WriteParams default to set auto_cleanup: None instead of
Some(AutoCleanupParams::default()). This addresses community feedback
that auto-cleanup should be an opt-in feature rather than enabled by
default.

Changes:
- WriteParams::default() now sets auto_cleanup to None
- Updated auto_cleanup_old_versions test to explicitly enable auto-cleanup
- Added test to verify auto-cleanup is disabled by default
- Enhanced MockDatasetFixture to support auto-cleanup configuration

Fixes lance-format#3854

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@wjones127 wjones127 force-pushed the feat/auto-cleanup-off-by-default branch from 1a26cfe to d04d8a0 Compare July 1, 2025 21:07
@github-actions github-actions Bot added the Stale label Nov 5, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution. This PR has been inactive for a while, so we're closing it to free up bandwidth. Feel free to reopen it if you still find it useful.

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.

Consider making auto cleanup off by default

2 participants