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 2020/08/22 07:46:01 UTC

[GitHub] [arrow] jorgecarleitao edited a comment on pull request #8018: ARROW-9815 [Rust] [DataFusion] Fixed deadlock caused by accessing the scalar functions' registry.

jorgecarleitao edited a comment on pull request #8018:
URL: https://github.com/apache/arrow/pull/8018#issuecomment-678609613


   Hey both, I think I implemented what we discussed, but the devil is always in the details.
   
   The main changes are:
   
   * `ExecutionContextState::datasources` and `ExecutionContextState::scalar_functions` are now boxed, not `Arc`. This is so that when we lock `ExecutionContextState`, both get locked, which means that we only need to lock `ExecutionContextState` (but threads can't change each independently).
   * `ExecutionContextState` is no longer clonable.
   * optimizers now expect references, not `Arc<Mutex<_>>`.
   * `SqlToRel` is now lifetimed, as it is now bound to `ExecutionContextState`.
   
   I feel that we should probably have a test to demonstrate that the `ExecutionContext` is thread safe (e.g. run two queries from two different threads).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org