fix: compare DuckLake metadata paths on the same absolute file - #497
Conversation
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
left a comment
There was a problem hiding this comment.
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.
Summary
Same-volume recreate of
v0.3.0-dev.20260907.2(055524a1) still failedATTACHwithstage=attach reason=driver_error.The image entrypoint
cds intoDATA_PATHand leaves--datadirat.. The metadata skip compared./ducklake.dbwith the absoluteMYDUCK_DUCKLAKE_METADATA_PATH, soattachCatalogsstill opened the catalog as a regular database.Identify the catalog file with
os.SameFileafterStat, withAbs/EvalSymlinksfallback. Ordinary catalogs in the data directory still ATTACH.Empty named volume first start on
055524a1passed without pre-chown.be2cd5bdand055524a1must not be promoted. Does not changev0.2.1/latest. Does not touch PR #489.Test
go test ./catalog -count=1 -run 'TestAttachCatalogSkipsDuckLakeMetadata'