avoid duplicated volume directory

This commit is contained in:
guol-fnst
2022-05-16 10:41:18 +08:00
parent 8f103ae613
commit de6aa9cce8
16 changed files with 186 additions and 40 deletions

View File

@@ -4,12 +4,13 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/chrislusf/seaweedfs/weed/pb"
"github.com/chrislusf/seaweedfs/weed/storage/types"
"math/rand"
"sync"
"time"
"github.com/chrislusf/seaweedfs/weed/pb"
"github.com/chrislusf/seaweedfs/weed/storage/types"
"github.com/chrislusf/raft"
hashicorpRaft "github.com/hashicorp/raft"
@@ -42,8 +43,10 @@ type Topology struct {
Configuration *Configuration
RaftServer raft.Server
HashicorpRaft *hashicorpRaft.Raft
RaftServer raft.Server
HashicorpRaft *hashicorpRaft.Raft
UUIDAccessLock sync.RWMutex
UUIDMap map[string][]string
}
func NewTopology(id string, seq sequence.Sequencer, volumeSizeLimit uint64, pulse int, replicationAsMin bool) *Topology {