Skip to content

fix: compare DuckLake metadata paths on the same absolute file - #497

Merged
weicao merged 1 commit into
mainfrom
feat/task88-metadata-abs
Sep 7, 2026
Merged

fix: compare DuckLake metadata paths on the same absolute file#497
weicao merged 1 commit into
mainfrom
feat/task88-metadata-abs

Conversation

@weicao

@weicao weicao commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Same-volume recreate of v0.3.0-dev.20260907.2 (055524a1) still failed ATTACH with stage=attach reason=driver_error.

The image entrypoint cds into DATA_PATH and leaves --datadir at .. The metadata skip compared ./ducklake.db with the absolute MYDUCK_DUCKLAKE_METADATA_PATH, so attachCatalogs still opened the catalog as a regular database.

Identify the catalog file with os.SameFile after Stat, with Abs/EvalSymlinks fallback. Ordinary catalogs in the data directory still ATTACH.

Empty named volume first start on 055524a1 passed without pre-chown. be2cd5bd and 055524a1 must not be promoted. Does not change v0.2.1 / latest. Does not touch PR #489.

Test

  • go test ./catalog -count=1 -run 'TestAttachCatalogSkipsDuckLakeMetadata'

The image entrypoint cds into DATA_PATH and leaves --datadir at ".". Skipping the metadata file compared "./ducklake.db" with the absolute MYDUCK_DUCKLAKE_METADATA_PATH, so attachCatalogs still opened ducklake.db and same-volume recreate failed.

Identify the catalog file with os.SameFile after Stat, with Abs/EvalSymlinks fallback. Keep ordinary catalogs attached.

Regression: datadir=. versus an absolute metadata path, and myduck.db still ATTACHes.

@leon-ape leon-ape left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review of exact head 0bc8b81.

Identity: GitHub verification=valid, unique parent cc1d245, tree f95784cc1345ff4654e1492c1b28d53876d7ca3e, 2 files (catalog/provider.go, catalog/provider_ducklake_test.go).

cc1d245 compared Clean(Join(dataDir, name)) to Clean(meta). The image entrypoint cds into DATA_PATH and leaves --datadir at ".", so ./ducklake.db does not match absolute MYDUCK_DUCKLAKE_METADATA_PATH and attachCatalogs still ATTACHed ducklake.db. That matches the 055524a1 same-volume recreate FIRST_RED.

This head identifies the catalog file with os.SameFile after Stat, with Abs/EvalSymlinks fallback. TestAttachCatalogSkipsDuckLakeMetadataRelativeDataDir covers datadir=. versus an absolute metadata path, skips ducklake, and still ATTACHes myduck.db.

Does not promote be2cd5bd / 055524a1. Does not change v0.2.1 / latest. Merge and CI classification remain with the author/PM. Image remount stays unproven until a new digest.

@weicao
weicao merged commit dda3134 into main Sep 7, 2026
12 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants