You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by la...@apache.org on 2022/12/19 03:37:10 UTC

[incubator-pegasus] branch v2.4 updated: fix: fix judgment to disk for partition split (#1293)

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 <48...@users.noreply.github.com>
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: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org