[Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist
The proposal to merge lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist has been updated. Status: Needs review => Merged -- https://code.launchpad.net/~zeitgeist/zeitgeist/pragma-settings/+merge/35833 Your team Zeitgeist Framework Team is subscribed to branch lp:~zeitgeist/zeitgeist/pragma-settings. ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp
Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist
Review: Approve revision rai...@ubuntu.com-20100918150908-03d463fxnsk03e29 (1589) Author: Siegfried-Angel Gevatter Pujals Date: Sat 2010-09-18 17:09:08 +0200 Branch: zeitgeist-trunk Merge ~zeitgeist/zeitgeist/pragma-settings. We change SQLite's locking mode to EXCLUSIVE, since this gives us a little reduction in file-system operations and ensures that there is only one process accessing the database. We also set the journal mode to the newly available WAL, if the system has a new enough SQLite (3.7.0+). This results in further performance improvements but it's important to note that this change is irreversible. -- https://code.launchpad.net/~zeitgeist/zeitgeist/pragma-settings/+merge/35833 Your team Zeitgeist Framework Team is subscribed to branch lp:~zeitgeist/zeitgeist/pragma-settings. ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp
Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist
Ok I thought it through again and these changes don't qualify to update the DB version, because: 1) We don' change any real data storage scheme 2) There is no need for a database migration 3) It is revertable -- https://code.launchpad.net/~zeitgeist/zeitgeist/pragma-settings/+merge/35833 Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist. ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp
Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist
yep I think so On Sat, Sep 18, 2010 at 9:34 AM, Markus Korn wrote: > I've another question: doesn't this change justify a boost of our db scheme > version? > -- > > https://code.launchpad.net/~zeitgeist/zeitgeist/pragma-settings/+merge/35833 > You proposed lp:~zeitgeist/zeitgeist/pragma-settings for merging. > -- This is me doing some advertisement for my blog http://seilo.geekyogre.com https://code.launchpad.net/~zeitgeist/zeitgeist/pragma-settings/+merge/35833 Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist. ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp
Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist
I've another question: doesn't this change justify a boost of our db scheme version? -- https://code.launchpad.net/~zeitgeist/zeitgeist/pragma-settings/+merge/35833 Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist. ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp
[Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist
The proposal to merge lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist has been updated. Description changed to: Turned the lock settings to EXCLUSIVE (no harm done there): --- When the locking-mode is set to EXCLUSIVE, the database connection never releases file-locks. The first time the database is read in EXCLUSIVE mode, a shared lock is obtained and held. The first time the database is written, an exclusive lock is obtained and held. There are two reasons to set the locking-mode to EXCLUSIVE. One is if the application actually wants to prevent other processes from accessing the database file. The other is that a small number of filesystem operations are saved by optimizations enabled in this mode. This may be significant in embedded environments. This is reversible by setting lock-mode to NORMAL. And conditionally set journal_mode to WAL: --- The WAL journaling mode uses a write-ahead log instead of a rollback journal to implement transactions. The WAL journaling mode is persistent; after being set it stays in effect across multiple database connections and after closing and reopening the database. A database in WAL journaling mode can only be accessed by SQLite version 3.7.0 or later. You can read more about the advantages here ==> http://www.sqlite.org/wal.html -- https://code.launchpad.net/~zeitgeist/zeitgeist/pragma-settings/+merge/35833 Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist. ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp
[Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist
Seif Lotfy has proposed merging lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist. Requested reviews: Zeitgeist Framework Team (zeitgeist) Related bugs: #639737 Improve insertion times https://bugs.launchpad.net/bugs/639737 Basically I turned the lock settings to EXCLUSIVE (no harm done there) And conditionally set journal_mode to WAL -- https://code.launchpad.net/~zeitgeist/zeitgeist/pragma-settings/+merge/35833 Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist. === modified file '_zeitgeist/engine/sql.py' --- _zeitgeist/engine/sql.py 2010-09-16 21:38:52 + +++ _zeitgeist/engine/sql.py 2010-09-17 14:19:41 + @@ -141,6 +141,11 @@ conn = sqlite3.connect(file_path) conn.row_factory = sqlite3.Row cursor = conn.cursor(UnicodeCursor) + if sqlite3.sqlite_version_info >= (3, 7, 0): + cursor.execute("PRAGMA journal_mode = WAL;") + cursor.execute("PRAGMA locking_mode = EXCLUSIVE;") + #cursor.execute("PRAGMA synchronous =NORMAL;") + # Always assume that temporary memory backed DBs have good schemas if constants.DATABASE_FILE != ":memory:": ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp