question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Delete files not eventually removed if RewriteDataFile run right after delete (when using 'use-starting-sequence-number' default)

See original GitHub issue

This RewriteDataFile flag value ‘use-starting-sequence-number’ (added and default true in #3480) seems to prevent delete files from getting cleaned up if these operations are run:

Delete from my_table where =
=> new delete_file has sequence number = n CALL %s.system.rewrite_data_files(table => my_table, options => map ('delete-file-threshold','1')
=> new data files have sequence_number = n, because starting sequence number = n

The only cleanup mechanism for delete files today is only when they have a sequence number less than all existing data files. So these delete files are not cleaned up in the subsequent operation (unlike if the flag was off and the rewritten files get the next sequence number n+1). As these data-files were just successfully re-written, it’s doubtful their delete file can ever get cleaned up because further rewrites will probably skip these already-optimized data files. These delete files will stay until all these data files get deleted.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
szehon-hocommented, Oct 21, 2022

Note , plan to put a design doc up next week for this.

2reactions
szehon-hocommented, Jun 22, 2022

Looks like more people hit this issue.

@rdblue @aokolnychyi @RussellSpitzer @jackye1995 (or anyone else) fyi if any thoughts on this. Its probably not a huge issue as delete files will not apply, and we plan eventually to have removeDanglingDeleteFiles, but not sure if we need to document this for time being or any other quick fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix Unable To Delete Outlook Data File ... - YouTube
The purpose of this video is to share my knowledge with everyone that is ... Outlook Data File & The Default Data file...
Read more >
Fine-Tuning Your Iceberg Table's Data Files - Dremio
Learn how to optimize the data files in your Apache Iceberg Table using compaction and its different strategies including z-order.
Read more >
Kubernetes delete POD with hostPath data files - Stack Overflow
Now when i run my POD i can see the files in defined path. But, Now I just wanted to delete files created...
Read more >
How to remove files and filesgroup from dis that have data in it?
You have to clean the files before removing them. Using command: USE [YourDB] GO DBCC SHRINKFILE (N'YourFileLogicalName' , EMPTYFILE).
Read more >
How to remove a SQL Server Data file for a multi-data file ...
You have a database with multiple data files and you want to remove one of the data files. This tip will demonstrate the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found