forked from rqlite/rqlite
-
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.
switch rqlite to using cache=shared for in-memory databases
This is a little hairy. Looking at things like [1], it's evident that golang's stdlib sql package doesn't work quite correctly with sqlite3's in-memory databases. In particular, the connection pooling causes problems, since there's no way to duplicate a connection to a particular in-memory database. So, we use cache=shared to force everything to point to the same in-memory database. However, this causes some problems (mostly that untill the last connection to this database is closed, the DB is not pruned). So we have to do a little cleanup after ourselves in this case. [1]: mattn/go-sqlite3#204 Signed-off-by: Tycho Andersen <[email protected]>
- Loading branch information
Tycho Andersen
committed
Feb 8, 2017
1 parent
0be7607
commit df1e05d
Showing
3 changed files
with
8 additions
and
9 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