Skip to content

Commit c58e2c5

Browse files
committed
Replace WLA with WAL
Upgrade to latest go-sqlite3 because WAL is only supported with newer versions Signed-off-by: Jonas Franz <[email protected]>
1 parent c5e50c4 commit c58e2c5

20 files changed

+23163
-11070
lines changed

Gopkg.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

custom/conf/app.ini.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ PATH = data/gitea.db
214214
; For "sqlite3" only. Query timeout
215215
SQLITE_TIMEOUT = 500
216216
; For "sqlite3" only. Journal mode
217-
JOURNAL_MODE = WLA
217+
JOURNAL_MODE = WAL
218218
; For iterate buffer, default is 50
219219
ITERATE_BUFFER_SIZE = 50
220220
; Show the database generated SQL

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
129129
- `PASSWD`: **\<empty\>**: Database user password. Use \`your password\` for quoting if you use special characters in the password.
130130
- `SSL_MODE`: **disable**: For PostgreSQL only.
131131
- `PATH`: **data/gitea.db**: For SQLite3 only, the database file path.
132-
- `JOURNAL_MODE` **WLA**: For SQLite3 only, the journal mode. Use `DELETE` mode if you're running Gitea on a network file system
133-
or your operating system does not support VFS. Please checkout the [WAL documentation](https://www.sqlite.org/wal.html) to learn more. WLA
132+
- `JOURNAL_MODE` **WAL**: For SQLite3 only, the journal mode. Use `DELETE` mode if you're running Gitea on a network file system
133+
or your operating system does not support VFS. Please checkout the [WAL documentation](https://www.sqlite.org/wal.html) to learn more. WAL
134134
mode will result in a better performance and reduces `database locked` errors.
135135
- `LOG_SQL`: **true**: Log the executed SQL.
136136

models/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func LoadConfigs() {
154154
DbCfg.SSLMode = sec.Key("SSL_MODE").String()
155155
DbCfg.Path = sec.Key("PATH").MustString("data/gitea.db")
156156
DbCfg.Timeout = sec.Key("SQLITE_TIMEOUT").MustInt(500)
157-
DbCfg.JournalMode = sec.Key("JOURNAL_MODE").MustString("WLA")
157+
DbCfg.JournalMode = sec.Key("JOURNAL_MODE").MustString("WAL")
158158

159159
sec = setting.Cfg.Section("indexer")
160160
setting.Indexer.IssuePath = sec.Key("ISSUE_INDEXER_PATH").MustString(path.Join(setting.AppDataPath, "indexers/issues.bleve"))

vendor/github.com/mattn/go-sqlite3/callback.go

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)