mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 历史数据库索引队列化 https://github.com/siyuan-note/siyuan/issues/7386
This commit is contained in:
parent
4d8b826e29
commit
f581b34ea8
14 changed files with 196 additions and 56 deletions
|
|
@ -1142,7 +1142,7 @@ func beginTx() (tx *sql.Tx, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func BeginHistoryTx() (tx *sql.Tx, err error) {
|
||||
func beginHistoryTx() (tx *sql.Tx, err error) {
|
||||
if tx, err = historyDB.Begin(); nil != err {
|
||||
logging.LogErrorf("begin history tx failed: %s\n %s", err, logging.ShortStack())
|
||||
if strings.Contains(err.Error(), "database is locked") {
|
||||
|
|
@ -1152,7 +1152,7 @@ func BeginHistoryTx() (tx *sql.Tx, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func CommitHistoryTx(tx *sql.Tx) (err error) {
|
||||
func commitHistoryTx(tx *sql.Tx) (err error) {
|
||||
if nil == tx {
|
||||
logging.LogErrorf("tx is nil")
|
||||
return errors.New("tx is nil")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue