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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1bb62a2d2 fix: fix judgment to disk for partition split (#1289)
1bb62a2d2 is described below

commit 1bb62a2d2de004fe38ca4de03f782610cf0aa715
Author: liguohao <[email protected]>
AuthorDate: Wed Dec 14 19:52:24 2022 +0800

    fix: fix judgment to disk for partition split (#1289)
---
 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