提升Partial Content的范围数据(ranges)写入效率

This commit is contained in:
刘祥超
2024-04-20 17:44:23 +08:00
parent c9dac96366
commit a7ad2cea8f
6 changed files with 184 additions and 3 deletions

View File

@@ -228,6 +228,7 @@ func (this *PartialFileWriter) Discard() error {
_ = this.rawWriter.Close()
fsutils.WriteEnd()
SharedPartialRangesQueue.Delete(this.rangePath)
_ = os.Remove(this.rangePath)
err := os.Remove(this.rawWriter.Name())
@@ -261,5 +262,7 @@ func (this *PartialFileWriter) IsNew() bool {
func (this *PartialFileWriter) remove() {
_ = os.Remove(this.rawWriter.Name())
SharedPartialRangesQueue.Delete(this.rangePath)
_ = os.Remove(this.rangePath)
}