-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow multiple Python threads to work with a single DeltaTable …
…instance This change introduces an internal Mutex inside of RawDeltaTable which allows the PyO3 bindings to share the Python object between threads at the Python layer. PyO3 will raise a `RuntimeError: Already borrowed` for any function call which takes a mutable reference to `self`. Introducing the internal Mutex ensures that all function signatures can operate with just self-references safely. The Rust-level Mutex is a simple passthrough for most operations which do not need to modify the underlying state. The critical sections which typically need to acquire and mutate with a lock are after I/O bound operations are completed as far as I can tell, so I don't anticipate deadlock or performance issues. There is still some cleanup of errors that needs to happen to make the code here more ergonomic when blending DeltaError with PoisonError from the lock, as such right now there's a lot of ugly error mapping. Fixes #2958 Signed-off-by: R. Tyler Croy <[email protected]> Sponsored-by: Neuralink Corp.
- Loading branch information
Showing
7 changed files
with
460 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "deltalake-python" | ||
version = "0.23.1" | ||
version = "0.23.2" | ||
authors = ["Qingping Hou <[email protected]>", "Will Jones <[email protected]>"] | ||
homepage = "https://github.com/delta-io/delta-rs" | ||
license = "Apache-2.0" | ||
|
@@ -33,6 +33,7 @@ env_logger = "0" | |
lazy_static = "1" | ||
regex = { workspace = true } | ||
thiserror = { workspace = true } | ||
tracing = { workspace = true } | ||
|
||
# runtime | ||
futures = { workspace = true } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.