This is an automated email from the ASF dual-hosted git repository.

laiyingchun pushed a commit to branch v2.4
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/v2.4 by this push:
     new db84a523d fix: fix judgment to disk for partition split (#1293)
db84a523d is described below

commit db84a523dcc0a62c9168f40f93239b3da99d0d89
Author: liguohao <[email protected]>
AuthorDate: Mon Dec 19 11:37:05 2022 +0800

    fix: fix judgment to disk for partition split (#1293)
---
 admin-cli/executor/partition_split.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/admin-cli/executor/partition_split.go 
b/admin-cli/executor/partition_split.go
index 10bab4d96..87505add9 100644
--- a/admin-cli/executor/partition_split.go
+++ b/admin-cli/executor/partition_split.go
@@ -153,7 +153,7 @@ func DiskBeforeSplit(client *Client, tableName string) 
error {
                for _, rCapacity := range nodeDiskStats.ReplicaCapacity {
                        totalSize += rCapacity.Size
                }
-               diskUsedAfterSplit := totalSize*3 + nodeDiskStats.DiskAvailable
+               diskUsedAfterSplit := totalSize*3 + nodeDiskStats.DiskCapacity 
- nodeDiskStats.DiskAvailable
                diskThreshold := nodeDiskStats.DiskCapacity * 9 / 10
                if diskUsedAfterSplit > diskThreshold {
                        return fmt.Errorf("disk(%s@%s) doesn't have enough 
space to execute partition split[after(%v) vs capacity(%v)]", 
nodeDiskStats.NodeAddress, nodeDiskStats.DiskTag, diskUsedAfterSplit, 
diskThreshold)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to