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

This commit is contained in:
GoEdgeLab
2024-04-29 22:36:26 +08:00
parent 43a594198e
commit f5136e94d8
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
}