Skip to content

Remove the index files of a dropped Lance table #496

Description

@robinskil

Problem

DROP TABLE leaves the index state of a Lance table in place. A new table with the same name reuses the same URI.

The new table then holds an index reference to a file that does not exist. COMPACT TABLE and UPDATE fail:

LanceError(IO): Object at location lance/beacon/mt_lifecycle.lance/_indices//page_data.lance not found

Evidence

  • Run the three tests alone: 3 passed.
  • Run the three tests after test_compact_keeps_indexes: 3 failed.

test_compact_keeps_indexes creates a btree index. The fixture then drops the table.

Failed tests

  • test_lance_tables.py::test_compact_honours_target_rows_per_fragment
  • test_lance_tables.py::test_compact_never_keeps_every_version
  • test_lance_tables.py::test_compact_after_update_preserves_values

Task

  1. Delete the _indices folder when the server drops a Lance table.
  2. Add a Rust test. The test drops a table with an index, creates the table again, and runs a compaction.

Environment

Branch features/reimplement-atlas. Image beacon-integration:local.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    beacon-kernelbugSomething isn't workingeffort-S1 to 3 daysrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions