From 0bb71bb5735ebbc522400b3be06ffc7c7be97b38 Mon Sep 17 00:00:00 2001
From: Vitaliy Filippov <vitalif@yourcmc.ru>
Date: Mon, 19 Jul 2021 17:17:51 +0300
Subject: [PATCH] Add 3 FIXMEs

---
 pkg/driver/controllerserver.go | 1 +
 pkg/mounter/goofys.go          | 1 +
 pkg/s3/client.go               | 1 +
 3 files changed, 3 insertions(+)

diff --git a/pkg/driver/controllerserver.go b/pkg/driver/controllerserver.go
index e332570..8a7337f 100644
--- a/pkg/driver/controllerserver.go
+++ b/pkg/driver/controllerserver.go
@@ -125,6 +125,7 @@ func (cs *controllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
 		return nil, fmt.Errorf("failed to initialize S3 client: %s", err)
 	}
 
+	// FIXME Don't delete the bucket if it existed initially
 	var deleteErr error
 	if prefix == "" {
 		// prefix is empty, we delete the whole bucket
diff --git a/pkg/mounter/goofys.go b/pkg/mounter/goofys.go
index 12a4f19..1a75364 100644
--- a/pkg/mounter/goofys.go
+++ b/pkg/mounter/goofys.go
@@ -46,6 +46,7 @@ func (goofys *goofysMounter) Unstage(stageTarget string) error {
 
 func (goofys *goofysMounter) Mount(source string, target string) error {
 	fullPath := fmt.Sprintf("%s:%s", goofys.meta.BucketName, goofys.meta.Prefix)
+	// FIXME Add memory limits
 	args := []string{
 		"--endpoint", goofys.endpoint,
 		"--region", goofys.region,
diff --git a/pkg/s3/client.go b/pkg/s3/client.go
index 17976a3..91c22f8 100644
--- a/pkg/s3/client.go
+++ b/pkg/s3/client.go
@@ -168,6 +168,7 @@ func (client *s3Client) removeObjects(bucketName, prefix string) error {
 }
 
 // will delete files one by one without file lock
+// FIXME Delete in parallel (if we want to delete objects at all!)
 func (client *s3Client) removeObjectsOneByOne(bucketName, prefix string) error {
 	objectsCh := make(chan minio.ObjectInfo, 1)
 	removeErrCh := make(chan minio.RemoveObjectError, 1)