mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-19 12:20:25 +08:00
写入和删除缓存文件时增加线程数限制
This commit is contained in:
@@ -39,9 +39,9 @@ func (this *Stmt) ExecContext(ctx context.Context, args ...any) (result sql.Resu
|
||||
if this.enableStat {
|
||||
defer SharedQueryStatManager.AddQuery(this.query).End()
|
||||
}
|
||||
fsutils.WriteBegin()
|
||||
fsutils.WriterLimiter.Ack()
|
||||
result, err = this.rawStmt.ExecContext(ctx, args...)
|
||||
fsutils.WriteEnd()
|
||||
fsutils.WriterLimiter.Release()
|
||||
return
|
||||
}
|
||||
|
||||
@@ -57,9 +57,9 @@ func (this *Stmt) Exec(args ...any) (result sql.Result, err error) {
|
||||
defer SharedQueryStatManager.AddQuery(this.query).End()
|
||||
}
|
||||
|
||||
fsutils.WriteBegin()
|
||||
fsutils.WriterLimiter.Ack()
|
||||
result, err = this.rawStmt.Exec(args...)
|
||||
fsutils.WriteEnd()
|
||||
fsutils.WriterLimiter.Release()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user