forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: [Go] Use shared cache in SQLite example. (apache#33983)
### Rationale for this change When calling this server with a few concurrent requests, you can easily force the Go stdlib to spawn a new connection. Since only the `:memory:` DSN is specified, the stdlib doesn't know any better and effectively creates a new database. The result is a lot of `no such table` errors. ### What changes are included in this PR? This change adds the `?cache=shared` as specified at: https://www.sqlite.org/sharedcache.html#enabling_shared_cache_mode This ensures that these new connections participate in same in-memory database and can see all the tables created at server start. ### Are these changes tested? I haven't written any additional tests here, because this behavior is difficult to test. Suggestions are welcome on an approach here. ### Are there any user-facing changes? No. * Closes: apache#33983 Authored-by: Brett Buddin <[email protected]> Signed-off-by: Matt Topol <[email protected]>
- Loading branch information
1 parent
63cb14e
commit 39bad54
Showing
3 changed files
with
34 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters