写入和删除缓存文件时增加线程数限制

This commit is contained in:
刘祥超
2024-04-29 22:36:26 +08:00
parent 7febc6aaf3
commit 973324ae8f
15 changed files with 117 additions and 136 deletions

View File

@@ -189,7 +189,7 @@ func (this *MemoryStorage) openWriter(key string, expiresAt int64, status int, h
if isDirty &&
this.parentStorage != nil &&
this.dirtyQueueSize > 0 &&
len(this.dirtyChan) >= this.dirtyQueueSize-int(fsutils.DiskMaxWrites) /** delta **/ { // 缓存时间过长
len(this.dirtyChan) >= this.dirtyQueueSize-64 /** delta **/ { // 缓存时间过长
return nil, ErrWritingQueueFull
}