You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/05 16:39:08 UTC
[GitHub] [arrow-datafusion] crepererum opened a new issue #680: `ExecutionContext` w/ information schema leaks catalogs
crepererum opened a new issue #680:
URL: https://github.com/apache/arrow-datafusion/issues/680
**Describe the bug**
Catalog registered to `ExecutionContext` with an information schema are never freed due to a cyclic Arc chain.
**To Reproduce**
Steps to reproduce the behavior:
```rust
#[tokio::test]
async fn catalogs_not_leaked() {
// the information schema used to introduce cyclic Arcs
let ctx = ExecutionContext::with_config(
ExecutionConfig::new().with_information_schema(true),
);
// register a single catalog
let catalog = Arc::new(MemoryCatalogProvider::new());
let catalog_weak = Arc::downgrade(&catalog);
ctx.register_catalog("my_catalog", catalog);
let catalog_list_weak = {
let state = ctx.state.lock().unwrap();
Arc::downgrade(&state.catalog_list)
};
drop(ctx);
assert_eq!(Weak::strong_count(&catalog_list_weak), 0);
assert_eq!(Weak::strong_count(&catalog_weak), 0);
}
```
**Expected behavior**
Memory is freed.
**Additional context**
Affects master branch at `58da15970dc0ec9e3c1c369fe89f6ba38e09d9c9`.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb closed issue #680: `ExecutionContext` w/ information schema leaks catalogs
Posted by GitBox <gi...@apache.org>.
alamb closed issue #680:
URL: https://github.com/apache/arrow-datafusion/issues/680
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org