Alexander Emelin
e288cd0836
fix sqlite3 tx retry condition operator precedence ( #32897 )
2021-04-13 18:26:54 +03:00
Arve Knudsen
9593d57914
Chore: Enable errorlint linter ( #29227 )
...
* Enable errorlint linter
* Handle wrapped errors
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-11-19 14:47:17 +01:00
Arve Knudsen
b5379c5335
Chore: Fix SQL related Go variable naming ( #28887 )
...
* Chore: Fix variable naming
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-11 06:21:08 +01:00
Arve Knudsen
a2fbffe48a
Server: Add health check route ( #26999 )
...
* Server: Add health check route
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Server: Remove health check middleware
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-18 14:58:08 +02:00
Arve Knudsen
4c56eb3991
Chore: Enable goprintffuncname and nakedret linters ( #26376 )
...
* Chore: Enable goprintffuncname linter
* Chore: Enable nakedret linter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-23 08:14:39 +02:00
Noval Agung Prayogo
ea35ae4d1f
Chore: Update the xorm dependency ( #22376 )
...
* Upgrade xorm
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-01 15:57:21 +02:00
Carl Bergquist
3798ac903d
Upgrade golangci-lint and fixes some linting errors. ( #22909 )
...
Example: https://play.golang.org/p/cfPIPG3BwjJ
2020-03-23 13:37:53 +01:00
jianweizhang
140e267639
delete redundant alias ( #21907 )
...
* delete redundant alias
Fixes #21906
2020-02-05 09:00:40 +01:00
Arve Knudsen
2a78d2a61c
pkg/services: Check errors ( #19712 )
...
* pkg/services: Check errors
* pkg/services: Don't treat context.Canceled|context.DeadlineExceeded as error
2019-10-22 14:08:18 +02:00
Marcus Efraimsson
5884e235fc
database: retry transaction if sqlite returns database is locked error ( #17276 )
...
Adds an additional sqlite error code 5 (SQLITE_BUSY) to the
transaction retry handler to add retries when sqlite
returns database is locked error.
More info: https://www.sqlite.org/rescode.html#busy
Ref #17247 #16638
2019-05-27 09:24:15 +02:00
Oleg Gaidarenko
756da8a134
Fix: tighten revive exit code & make it happy ( #17127 )
...
* Revive should fail the build
* Fix the associated errors
2019-05-17 08:35:37 +03:00
Andrej Ocenas
3dbc3251d1
Chore: Deduplicate sqlstore transaction code ( #17069 )
...
* Deduplicate transaction code
* More deduplication
2019-05-16 12:39:59 +02:00
zhulongcheng
2fff8f77dc
move log package to /infra ( #17023 )
...
ref #14679
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-05-13 08:45:54 +02:00
bergquist
12c9860882
string formating fixes
2018-08-28 22:33:38 +02:00
bergquist
4c5fe68e7e
adds inTransactionCtx that calls inTransactionWithRetryCtx
2018-06-15 21:57:13 +02:00
bergquist
da91b91b4b
transactions: start sessions and transactions at the same place
...
this make it possible for handler to use `withSession` when
transactions is not nedded and `inTransactionCtx` if its needed
without knowing who owns the session/transaction
2018-06-15 20:52:57 +02:00
bergquist
9ca9a7c302
bus: dont start transaction when creating session
2018-06-15 12:46:20 +02:00
Torkel Ödegaard
442e0e437b
refactoring: transaction manager PR #12203
2018-06-15 12:46:20 +02:00