mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-29 19:04:36 +08:00
Improve EC shards rebalancing logic across racks (#6270)
Improve EC shards rebalancing logic across racks. - Favor target shards with less preexisting shards, to ensure a fair distribution. - Randomize selection when multiple possible target shards are available. - Add logic to account for replication settings when selecting target shards (currently disabled).
This commit is contained in:
@@ -2,15 +2,18 @@ package shell
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/storage/erasure_coding"
|
||||
"github.com/seaweedfs/seaweedfs/weed/storage/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
//"google.golang.org/protobuf/proto"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
||||
)
|
||||
|
||||
@@ -127,3 +130,6 @@ var topoData string
|
||||
|
||||
//go:embed volume.list2.txt
|
||||
var topoData2 string
|
||||
|
||||
//go:embed volume.ecshards.txt
|
||||
var topoDataEc string
|
||||
|
||||
Reference in New Issue
Block a user