You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ExecutionContext w/ information schema leaks catalogs #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:
#[tokio::test]asyncfncatalogs_not_leaked(){// the information schema used to introduce cyclic Arcslet ctx = ExecutionContext::with_config(ExecutionConfig::new().with_information_schema(true),);// register a single cataloglet 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.
Activity
use `Weak` ptr to break catalog list <> info schema cyclic reference
use `Weak` ptr to break catalog list <> info schema cyclic reference (#…