felipecrv opened a new issue, #2791: URL: https://github.com/apache/arrow-adbc/issues/2791
### What feature or improvement would you like to see? This would make locking more fine-grained and remove the need for a pessimistic lock around the entire `AdbcConnectionInit` call. This is how Rust's driver manager wraps the FFI call today. ```rust /// Initialize the given connection using the loaded driver. fn connection_init( &self, mut connection: ffi::FFI_AdbcConnection, ) -> Result<ffi::FFI_AdbcConnection> { let driver = self.ffi_driver(); let mut database = self.inner.database.lock().unwrap(); // ConnectionInit let mut error = ffi::FFI_AdbcError::with_driver(driver); let method = driver_method!(driver, ConnectionInit); let status = unsafe { method(&mut connection, &mut *database, &mut error) }; check_status(status, error)?; Ok(connection) } ``` As connection initialization can mutate the database object that initializes it a lock on `self.inner.database` must be acquired before the call. A driver performing multi-step auth actions might be waiting on HTTP requests during the `AdbcConnectionInit` call. If the driver took responsibility of the locking, it could let these HTTP calls happen in parallel and only synchronize the actual mutations to the database object (e.g. caching obtained info for re-use). -- 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: issues-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org