add back previous chunk upload selection algo

This commit is contained in:
chrislu
2023-01-03 22:50:39 -08:00
parent 7bdae5172e
commit 5423790b2c
4 changed files with 35 additions and 5 deletions

View File

@@ -86,6 +86,13 @@ func (mc *MemChunk) ActivityScore() int64 {
return mc.activityScore.ActivityScore()
}
func (mc *MemChunk) WrittenSize() int64 {
mc.RLock()
defer mc.RUnlock()
return mc.usage.WrittenSize()
}
func (mc *MemChunk) SaveContent(saveFn SaveToStorageFunc) {
mc.RLock()
defer mc.RUnlock()