Skip to content

Comments

perf(reader): cache OpenDAL Operators#2177

Draft
mbutrovich wants to merge 1 commit intoapache:mainfrom
mbutrovich:operator_caching
Draft

perf(reader): cache OpenDAL Operators#2177
mbutrovich wants to merge 1 commit intoapache:mainfrom
mbutrovich:operator_caching

Conversation

@mbutrovich
Copy link
Collaborator

Draft/POC for discussion, particularly @Xuanwo and @CTTY.

Which issue does this PR close?

What changes are included in this PR?

  • Added operator_cache: Arc<Mutex<HashMap<String, Operator>>> to S3, Gcs, Oss, and Azdls variants of OpenDalStorage
  • Added get_or_create_operator() helper that checks the cache by bucket/container name before building a new operator
  • create_operator() now caches operators per bucket for S3/GCS/OSS and per filesystem for Azdls
  • RetryLayer is applied once when an operator is created and cached, rather than on every call
  • Memory and LocalFs don't use the cache (Memory clones a shared operator, LocalFs is local)

Are these changes tested?

Existing tests.

@mbutrovich mbutrovich changed the title Extract more changes from reader_perf. perf(reader): Cache OpenDAL Operators Feb 24, 2026
@mbutrovich mbutrovich changed the title perf(reader): Cache OpenDAL Operators perf(reader): cache OpenDAL Operators Feb 24, 2026
@mbutrovich mbutrovich self-assigned this Feb 24, 2026
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.

1 participant