Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-2.2] Add test and fix mutex errors on Windows #2083

Merged
merged 1 commit into from
Feb 8, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 8, 2021

Backport a168cca from #2077

* Add test for array open and free with invalid URI

* 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.
@joe-maley joe-maley merged commit e826a72 into release-2.2 Feb 8, 2021
@Shelnutt2 Shelnutt2 deleted the backport-2077-to-release-2.2 branch June 8, 2021 10:48
bekadavis9 added a commit that referenced this pull request Nov 12, 2024
Schema evolution bug fix: Reads no longer fail after dropping a fixed
attribute and adding it back as var-sized.

Followup to #5321 to address a previously-missed case caught by
[TileDB-Inc/TileDB-Py/#2083](TileDB-Inc/TileDB-Py#2083)

[sc-55085]

---
TYPE: BUG
DESC: Schema evolution bug fix: Reads no longer fail after dropping a
fixed attribute and adding it back as var-sized, part 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants