Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix rare deadlock during matching due to concurrent database access#2876

Merged
ahojnnes merged 1 commit into
maincolmap/colmap:mainfrom
user/jsch/deadlock-database-transactioncolmap/colmap:user/jsch/deadlock-database-transactionCopy head branch name to clipboard
Nov 2, 2024
Merged

Fix rare deadlock during matching due to concurrent database access#2876
ahojnnes merged 1 commit into
maincolmap/colmap:mainfrom
user/jsch/deadlock-database-transactioncolmap/colmap:user/jsch/deadlock-database-transactionCopy head branch name to clipboard

Conversation

@ahojnnes

@ahojnnes ahojnnes commented Nov 2, 2024

Copy link
Copy Markdown
Contributor

It turns out one cannot concurrent read from the database and begin a transaction. This could happen in rare cases during vocabulary tree based matching, as the querying of the vocabulary tree is performed concurrently to the main matching controller thread. In this case, one thread might simultaneously read and begin a transaction. This causes a deadlock if unlucky. With this PR, this cannot happen anymore.

@ahojnnes
ahojnnes merged commit 073f2e4 into main Nov 2, 2024
@ahojnnes
ahojnnes deleted the user/jsch/deadlock-database-transaction branch November 2, 2024 12:28
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.