kszucs opened a new pull request, #784:
URL: https://github.com/apache/arrow-rs-object-store/pull/784

   # Which issue does this PR close?
   
   No tracking issue; happy to file one if preferred.
   
   # Rationale for this change
   
   `ObjectStoreRegistry` can `register` and `resolve` stores but has no way to 
remove one. Consumers that register stores dynamically (e.g. per-session) need 
to deregister them as well.
   
   # What changes are included in this PR?
   
   - Add `ObjectStoreRegistry::deregister(&self, url: &Url) -> Option<Arc<dyn 
ObjectStore>>`, the inverse of `register`, with a default implementation 
returning `None`.
   - Implement it for `DefaultObjectStoreRegistry`: removes the store at the 
exact scheme/authority/path of `url` (siblings and longer prefixes are left in 
place) and prunes emptied tree branches.
   - Tests covering exact removal, sibling/longer-prefix preservation, and 
unknown URLs.
   
   # Are there any user-facing changes?
   
   Yes: a new `ObjectStoreRegistry::deregister` trait method. It has a default 
implementation, so existing implementors are unaffected.


-- 
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]

Reply via email to