Skip to content

Commit

Permalink
fix(backend): 修改redis容量计算方法 #1652
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Nov 3, 2023
1 parent 0bd817a commit 575a0c2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dbm-ui/backend/db_meta/models/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def capacity(self):
ClusterType.TwemproxyTendisSSDInstance,
ClusterType.TendisPredixyTendisplusCluster,
]:
return mount_point__size["/data1"]
return mount_point__size.get("/data1") or mount_point__size["/data"] / 2

if self.spec_cluster_type == ClusterType.TendisTwemproxyRedisInstance:
# 取min, max都一样
Expand Down
2 changes: 1 addition & 1 deletion dbm-ui/backend/db_services/dbresource/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def validate_data_points(self, attrs):
raise serializers.ValidationError(
_("【{}】后端磁盘挂载点必须包含/data,可选/data1").format(attrs["spec_cluster_type"])
)
# TendisPlus/TendisSSD 磁盘必须包含/data和/data1
# TendisPlus/TendisSSD 磁盘必须包含/data,/data1可选
if (
attrs["spec_cluster_type"]
in [
Expand Down
2 changes: 1 addition & 1 deletion dbm-ui/frontend/src/types/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
}
4 changes: 2 additions & 2 deletions helm-charts/bk-dbm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ dependencies:
description: A Helm chart for bkdbm
name: bk-dbm
type: application
version: 1.2.0-alpha.76
appVersion: 1.2.0-alpha.76
version: 1.2.0-alpha.77
appVersion: 1.2.0-alpha.77
2 changes: 1 addition & 1 deletion helm-charts/bk-dbm/charts/dbm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 1.2.0-alpha.443
appVersion: 1.2.0-alpha.444
description: A Helm chart for dbm
name: dbm
type: application
Expand Down

0 comments on commit 575a0c2

Please sign in to comment.