Skip to content

[Bug] COSN FileSystem is not cached by authority #8813

Description

@thswlsqls

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version
master @ 85a0115

Compute Engine
Engine-agnostic (core)

Minimal reproduce step
HadoopCompliantFileIO.getFileSystem() (paimon-filesystems/paimon-cosn-impl/src/main/java/org/apache/paimon/cosn/HadoopCompliantFileIO.java line 109) caches a single FileSystem fs for the first authority (bucket) it sees and returns it for every subsequent path. When one COSNFileIO instance serves paths across multiple COSN buckets on the default (non-resolving) FileIO path, all requests are routed to the first bucket's FileSystem.

What doesn't meet your expectations?
Expected: each authority (bucket) gets its own cached FileSystem. Actual: the first bucket's FileSystem is reused for all authorities.

Anything else?
The sibling implementations already cache per authority in a Map<String, FileSystem> keyed by path.toUri().getAuthority() (null → "DEFAULT"): see paimon-oss-impl (#2417), paimon-s3-impl (#2504), paimon-gs-impl, and paimon-obs-impl (#8589, now merged). COSN was never updated to match.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions