mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
* s3tables: let DirHoldsFiles count only files older than a cutoff A non-zero cutoff skips files created at or after it, and Iceberg metadata files directly under the walked directory's metadata/ folder, which a create stages before its record exists. Existing callers pass the zero time and keep counting every file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3tables: keep files a deleted table or view did not write DeleteTable purged the table's directory (or its decoupled data location) recursively, and DeleteView purged the view's directory, so files that were already there when the record was created, or that were written under a view, went with it. Those files now stay: the record's attributes are cleared and the directory is left as a leftover. A table still purges the files it wrote after its create, and its staged metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * iceberg: skip the drop purge of a location holding older files DropTable and DropView purge the dropped entry's location after the catalog delete. A location that holds files older than the table, or any file other than metadata for a view, is left alone, matching DeleteTable and DeleteView. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3tables: count a file from the record's own second as older File creation times have second granularity, so an upload made in the same second as the table's create compared equal and was purged. An equal second now counts as older, and the view cutoff no longer needs the extra second. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3tables: count S3 objects stored on directories in DirHoldsFiles A trailing-slash key, or a file promoted to a directory by a child write, is an S3 object on a directory entry. The walk only counted plain files, so a delete purged such objects, including one on the purged path itself. They now count like files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3tables: keep every non-metadata file under a deleted view A view writes nothing but its metadata files, so a file under it counts whatever its creation time, including one stamped ahead of this clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3tables: count a file from the record's own second as the record's File times are whole seconds, and a writer's first file (an insert right after a create, or a CTAS writing in the second it staged) often shares the record's second. Counting it as older kept the table's own files on drop, so a re-create at the location found it non-empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * iceberg: date a staged create's table from its stage The engine writes a staged create's first files before the commit registers the table, so they predate its record and a drop kept them. The commit now passes the time the stage marker recorded, in process only, and the table's CreatedAt starts there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3tables: say a view name holds plain files instead of a table A view deleted over files it did not write leaves its directory without a catalog record. CreateView reported that directory as a table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3tables: keep a view location's metadata files older than the view A view writes its metadata only after its record, so a metadata file from an earlier second at the location is not the view's and keeps the directory on a drop, like any other file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * iceberg: test that a view drop keeps older metadata at its location Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * iceberg: date both view drop test files from one record time Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * iceberg: drop only the table or view record the lookup read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * iceberg: test a drop whose record is replaced after the lookup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * iceberg: check the location claim again after the drop scan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * iceberg: test a location claimed while the drop scans it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>