-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Be resilient to getting busy messages back from sqlite while retrieving data. #21800
Conversation
…ng the string table.
Tagging @dotnet/roslyn-ide |
Tagging @dpoeschl |
tagging @heejaechang |
{ | ||
var statement = resettableStatement.Statement; | ||
while (statement.Step() == Result.ROW) | ||
using (var resettableStatement = connection.GetResettableStatement( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so issue was we not releasing this resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Issue was leaking out a "busy" exception.
…to dotnet/dev15.4.x Be resilient to getting busy messages back from sqlite while retrieving data.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems?id=452360&fullScreen=true&_a=edit
Note: this issue should happen a lot less in 15.5 as heejae made a change in #21532 to have separate DBs for VS and for the OOP process. Without having two processes hitting the same DB, there should be a lot less contention on the DB and busy exceptions should be much rarer.
Also, because we enabled WAL (write ahead logging) busy errors happen far less: https://sqlite.org/wal.html
"The second advantage of WAL-mode is that writers do not block readers and readers to do not block writers. "