s3: added logic for deduping blobs

Because s3 doesn't support hard links we store duplicated blobs
as empty files. When the original blob is deleted its content is
moved to the the next duplicated blob and so on.

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
Petu Eusebiu
2022-04-12 13:01:04 +03:00
committed by Ramkumar Chinchani
parent ad08c08986
commit 5e22acbbc4
11 changed files with 1027 additions and 117 deletions
+2 -2
View File
@@ -17,9 +17,9 @@ func TestCache(t *testing.T) {
log := log.NewLogger("debug", "")
So(log, ShouldNotBeNil)
So(storage.NewCache("/deadBEEF", "cache_test", log), ShouldBeNil)
So(storage.NewCache("/deadBEEF", "cache_test", true, log), ShouldBeNil)
cache := storage.NewCache(dir, "cache_test", log)
cache := storage.NewCache(dir, "cache_test", true, log)
So(cache, ShouldNotBeNil)
val, err := cache.GetBlob("key")