aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/erasure_coding/ec_shard.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/erasure_coding/ec_shard.go')
-rw-r--r--weed/storage/erasure_coding/ec_shard.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/storage/erasure_coding/ec_shard.go b/weed/storage/erasure_coding/ec_shard.go
index 687a582a7..9eeb35725 100644
--- a/weed/storage/erasure_coding/ec_shard.go
+++ b/weed/storage/erasure_coding/ec_shard.go
@@ -57,6 +57,14 @@ func EcShardFileName(collection string, dir string, id int) (fileName string) {
return
}
+func EcShardBaseFileName(collection string, id int) (baseFileName string) {
+ baseFileName = strconv.Itoa(id)
+ if collection != "" {
+ baseFileName = collection+"_"+baseFileName
+ }
+ return
+}
+
func (shard *EcVolumeShard) Close() {
if shard.ecdFile != nil {
_ = shard.ecdFile.Close()