-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enable usleep support #285
Comments
I'm preparing a commit to add this flag and many others that are necessary to configure SQLite on OS X and Linux. Should be able to send a PR shortly. |
gjrtimmer
added a commit
to gjrtimmer/go-sqlite3
that referenced
this issue
May 26, 2018
Compile Section Closes mattn#175 Compile Section Closes mattn#201 Compile Section Closes mattn#206 Compile Section Closes mattn#404 Compile Section Closes mattn#217 Compile Section Closes mattn#224 Compile Section Closes mattn#234 Compile Section Closes mattn#242 Feature table Closes mattn#255 Description Section Closes mattn#232 Golang:1.6 not supported Closes mattn#272 Golang:1.5 not supported + compilation section Closes mattn#283 usleep Implemented Closes mattn#285 FAQ Section Closes mattn#289 Compile Section closes mattn#295 FAQ Section Closes mattn#305 PR339 Closes mattn#318 mattn#321 Compilation Section Closes mattn#341 PR407 Closes mattn#364 Feature `sqlite_vtable` Closes mattn#393 Compile Section Closes mattn#416 sqlite_trace feature Closes mattn#433 Compilation Section Closes mattn#435 Compilation Section Closes mattn#443 Golang:1.6 Not Supported Closes mattn#445 Compilation Section Closes mattn#451 Compilation Section Closes mattn#467 Compilation Section Closes mattn#491 Compilation Section Closes mattn#495 Compilation Section Closes mattn#505 Compilation Section Closes mattn#557 Compilation Section Closes mattn#560
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been trying to use these SQLite bindings for Golang and been observing that my queries pause frequently for a significant amount of time. Given enough contention accessing the database, the whole app grinds to a halt.
I thought I had a deadlock somewhere, but I think the cause is simpler and this online post http://beets.io/blog/sqlite-nightmare.html helped me track it down.
Basically, it seems to me that sqlite is being compiled without usleep support, which means that any backoff during contention incurs a significant penalty. Inspecting the code, I do not see
HAVE_USLEEP=1
being defined anywhere in this codebase.Setting
-DHAVE_USLEEP=1
in the#cgo
stanza ofsqlite3.go
should be sufficient, though I don't know if that's going to break any supported platform.The text was updated successfully, but these errors were encountered: