Skip to content

Commit

Permalink
db file should exist for a table to exist (#6634)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anshul authored Feb 10, 2025
1 parent ea02634 commit 6cfd7b2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions runtime/pkg/rduckdb/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,13 @@ func (d *db) tableMeta(name string) (*tableMeta, error) {
return nil, err
}

// this is required because release version does not delete table directory as of now
_, err = os.Stat(d.localTableDir(name, m.Version))
// this is required because release version does not delete entire table directory but only the version directory
// and hence the meta file may exist but the db file may not
if m.Type == "TABLE" {
_, err = os.Stat(d.localDBPath(name, m.Version))
} else {
_, err = os.Stat(d.localTableDir(name, m.Version))
}
if err != nil {
if errors.Is(err, fs.ErrNotExist) {
return nil, errNotFound
Expand Down

0 comments on commit 6cfd7b2

Please sign in to comment.