tanmayrauth commented on issue #1096:
URL: https://github.com/apache/iceberg-go/issues/1096#issuecomment-4672462044
On fs.mkdirs: Yes, the trick is Java never reads mkdir's result — it does if
(isNamespace) throw AlreadyExists first (that's a Stat), then just calls
fs.mkdirs. So "drop Mkdir" only meant dropping our non-recursive, error-gated
Mkdir. We keep directory creation.
What creates the dir on localfs: MkdirAll — keep it, it's the real analog
of Java's mkdirs. Slim interface: List + Stat + Read + Write + Remove(All) +
Rename + MkdirAll. CreateNamespace → Stat(path) (exists → AlreadyExists) →
Stat(parent) (missing → ErrNoSuchNamespace) → MkdirAll. That parent Stat is
required, not optional — without it MkdirAll creates parents itself and
TestCreateNamespaceNestedParentMissing quietly breaks.
Dir-only namespace / dummy file: Keeping Mkdir as a blob no-op is the trap
— the namespace never really exists, so List/Drop/Check come back empty (passes
local tests, breaks only on the backend we can't test). The marker object is
the real fix, but it's a layout change — out of scope here. So: keep local-fs
the only writer, defer the marker decision to the cloud/concurrent-write PR.
Thanks for digging into this!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]