-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sm::array_open_for_reads: fetch fragments async instead of schema
Invert the tasking order for async loading established in #2061 Now load the fragments in a task and array schema on main. Fixes several mutex ownership issues which surfaced on Windows. (1) We need to wait on the async task in all return clauses to avoid the following situation which causes an exit on Windows: if the context owning the storage manager is destroyed without joining the async thread, then we get an error on Windows due to attempting to destruct a locked mutex. (2) We cannot call open_array->mtx_unlock() on the main thread after running the array_open call async on the thread pool (which locks the open_array.mtx_), because lock/unlock on different threads is undefined behavior and a runtime error on windows.
- Loading branch information
Showing
2 changed files
with
63 additions
and
46 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
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