aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/erasure_coding/ec_shard.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-03 02:26:31 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-03 02:26:31 -0700
commit7e80b2b8823a9bb8bac58100a76d6a5825c94be4 (patch)
treef406744ba5e7302157de46a59b4e5c09abff067f /weed/storage/erasure_coding/ec_shard.go
parent55be09996d8f82e461e1c464db82707c982b2b57 (diff)
downloadseaweedfs-7e80b2b8823a9bb8bac58100a76d6a5825c94be4.tar.xz
seaweedfs-7e80b2b8823a9bb8bac58100a76d6a5825c94be4.zip
fix multiple bugs
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()