This commit is contained in:
Daniel
2024-04-12 20:33:53 +08:00
parent f822e4d69e
commit ee473289d2
3 changed files with 32 additions and 23 deletions

View File

@@ -33,8 +33,7 @@ import (
var (
historyOperationQueue []*historyDBQueueOperation
historyDBQueueLock = sync.Mutex{}
historyTxLock = sync.Mutex{}
historyTxLock = sync.Mutex{}
)
type historyDBQueueOperation struct {
@@ -51,7 +50,8 @@ func FlushHistoryTxJob() {
func FlushHistoryQueue() {
ops := getHistoryOperations()
if 1 > len(ops) {
total := len(ops)
if 1 > total {
return
}
@@ -97,7 +97,7 @@ func FlushHistoryQueue() {
}
}
if 128 < len(ops) {
if 128 < total {
debug.FreeOSMemory()
}