Skip to content

fix(rest): include container in prefix-scoped IO cache key - #2174

Merged
laskoviymishka merged 1 commit into
apache:mainfrom
Revanth14:fix/prefix-scoped-io-container-key
Oct 11, 2026
Merged

laskoviymishka merged 1 commit into
apache:mainfrom
Revanth14:fix/prefix-scoped-io-container-key

Conversation

@Revanth14

Copy link
Copy Markdown
Contributor

Problem

prefixScopedIO caches one filesystem per credentialIndex:scheme://host, but url.URL.Host excludes the container@ userinfo, and an Azure IO is bound to a single container@host authority. Two containers in the same account therefore share a cached IO, and reads from the second fail with ErrUnsupportedObjectAuthority. This happens both when one plan credential covers both containers and when no credential matches either.

Fix

The cache key now includes the userinfo, so it names the same authority the Azure IO is bound to. S3 and GCS locations have no userinfo, so their keys are unchanged.

Testing

TestPrefixScopedIOKeysFilesystemsByContainer fails on main (one filesystem is opened for both containers) and passes with the fix.

Context

Found while reviewing #2163.

@Revanth14
Revanth14 requested a review from zeroshade as a code owner October 10, 2026 19:28

@laskoviymishka laskoviymishka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@laskoviymishka
laskoviymishka merged commit f403a02 into apache:main Oct 11, 2026
15 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