使用新的方法控制缓存并发写入速度

This commit is contained in:
GoEdgeLab
2023-07-29 09:29:36 +08:00
parent 079955b93e
commit 986ac733fd
12 changed files with 116 additions and 136 deletions

View File

@@ -12,7 +12,7 @@ var (
ErrEntityTooLarge = errors.New("entity too large")
ErrWritingUnavailable = errors.New("writing unavailable")
ErrWritingQueueFull = errors.New("writing queue full")
ErrTooManyOpenFiles = errors.New("too many open files")
ErrServerIsBusy = errors.New("server is busy")
)
// CapacityError 容量错误
@@ -38,7 +38,7 @@ func CanIgnoreErr(err error) bool {
err == ErrEntityTooLarge ||
err == ErrWritingUnavailable ||
err == ErrWritingQueueFull ||
err == ErrTooManyOpenFiles {
err == ErrServerIsBusy {
return true
}
_, ok := err.(*CapacityError)