|
@@ -21,6 +21,7 @@ import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
"path"
|
|
|
+ "runtime/debug"
|
|
|
"sync"
|
|
|
"time"
|
|
|
|
|
@@ -121,7 +122,7 @@ func FlushQueue() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if 0 < i && 0 == execOps%64 {
|
|
|
+ if 0 < i && 0 == execOps%128 {
|
|
|
if err = commitTx(tx); nil != err {
|
|
|
logging.LogErrorf("commit tx failed: %s", err)
|
|
|
return
|
|
@@ -132,6 +133,7 @@ func FlushQueue() {
|
|
|
if nil != err {
|
|
|
return
|
|
|
}
|
|
|
+ debug.FreeOSMemory()
|
|
|
}
|
|
|
}
|
|
|
|