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

Be resilient to getting busy messages back from sqlite while retrieving data. #21800

Merged
merged 2 commits into from
Aug 31, 2017

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Aug 29, 2017

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. "

@CyrusNajmabadi
Copy link
Member Author

Tagging @dotnet/roslyn-ide

@CyrusNajmabadi
Copy link
Member Author

Tagging @dpoeschl

@CyrusNajmabadi
Copy link
Member Author

tagging @heejaechang

{
var statement = resettableStatement.Statement;
while (statement.Step() == Result.ROW)
using (var resettableStatement = connection.GetResettableStatement(
Copy link
Contributor

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?

Copy link
Member Author

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.

@CyrusNajmabadi CyrusNajmabadi merged commit 47a6310 into dotnet:master Aug 31, 2017
@CyrusNajmabadi CyrusNajmabadi deleted the sqliteBusy branch August 31, 2017 00:33
sharwell pushed a commit to sharwell/roslyn that referenced this pull request Oct 12, 2017
…to dotnet/dev15.4.x

Be resilient to getting busy messages back from sqlite while retrieving data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants