diff --git a/dbm-services/redis/db-tools/dbactuator/pkg/atomjobs/atomredis/redis_install.go b/dbm-services/redis/db-tools/dbactuator/pkg/atomjobs/atomredis/redis_install.go index 27488b7ba5..be3f36e29c 100644 --- a/dbm-services/redis/db-tools/dbactuator/pkg/atomjobs/atomredis/redis_install.go +++ b/dbm-services/redis/db-tools/dbactuator/pkg/atomjobs/atomredis/redis_install.go @@ -25,19 +25,19 @@ import ( // RedisInstallParams 安装参数 type RedisInstallParams struct { common.MediaPkg - DbToolsPkg common.DbToolsMediaPkg `json:"dbtoolspkg"` - RedisModulesPkg common.RedisModulesMediaPkg `json:"redis_modules_pkg"` - DataDirs []string `json:"data_dirs"` - IP string `json:"ip" validate:"required"` - Ports []int `json:"ports"` // 如果端口不连续,可直接指定端口 - StartPort int `json:"start_port"` // 如果端口连续,则可直接指定起始端口和实例个数 - InstNum int `json:"inst_num"` - Password string `json:"password" validate:"required"` - Databases int `json:"databases" validate:"required"` - RedisConfConfigs map[string]string `json:"redis_conf_configs" validate:"required"` - DbType string `json:"db_type" validate:"required"` - MaxMemory uint64 `json:"maxmemory"` - LoadModulesDetail []LoadModuleItem `json:"load_modules_detail"` + DbToolsPkg common.DbToolsMediaPkg `json:"dbtoolspkg"` + RedisModulesPkg common.RedisModulesMediaPkg `json:"redis_modules_pkg"` + DataDirs []string `json:"data_dirs"` + IP string `json:"ip" validate:"required"` + Ports []int `json:"ports"` // 如果端口不连续,可直接指定端口 + StartPort int `json:"start_port"` // 如果端口连续,则可直接指定起始端口和实例个数 + InstNum int `json:"inst_num"` + Password string `json:"password" validate:"required"` + Databases int `json:"databases" validate:"required"` + RedisConfConfigs map[string]string `json:"redis_conf_configs" validate:"required"` + DbType string `json:"db_type" validate:"required"` + // MaxMemory uint64 `json:"maxmemory"` //不要它了撒 + LoadModulesDetail []LoadModuleItem `json:"load_modules_detail"` } // LoadModuleItem 加载module信息 @@ -539,7 +539,7 @@ func (job *RedisInstall) GenerateConfigFile(port int) (err error) { confData = strings.ReplaceAll(confData, "{{redis_data_dir}}", instDir) confData = strings.ReplaceAll(confData, "{{databases}}", strconv.Itoa(job.params.Databases)) confData = strings.ReplaceAll(confData, "{{cluster_enabled}}", clusterEnabled) - confData = strings.ReplaceAll(confData, "{{maxmemory}}", strconv.FormatUint(job.params.MaxMemory, 10)) + confData = strings.ReplaceAll(confData, "{{maxmemory}}", "0") confData = strings.ReplaceAll(confData, "{{rocks_blockcachemb}}", strconv.FormatUint(instBlockcache, 10)) confData = strings.ReplaceAll(confData, "{{rocks_write_buffer_size}}", strconv.FormatUint(writeBufferSize, 10)) diff --git a/dbm-services/redis/db-tools/dbactuator/tests/redistest/redis_install.go b/dbm-services/redis/db-tools/dbactuator/tests/redistest/redis_install.go index f4da012403..92db7df5b2 100644 --- a/dbm-services/redis/db-tools/dbactuator/tests/redistest/redis_install.go +++ b/dbm-services/redis/db-tools/dbactuator/tests/redistest/redis_install.go @@ -172,7 +172,7 @@ func (test *RedisInstallTest) SetMaxMemory(maxMemory uint64) *RedisInstallTest { if test.Err != nil { return test } - test.MaxMemory = maxMemory + // test.MaxMemory = maxMemory return test } diff --git a/dbm-ui/backend/flow/utils/redis/redis_act_playload.py b/dbm-ui/backend/flow/utils/redis/redis_act_playload.py index fec847ca85..c6dfa44edb 100644 --- a/dbm-ui/backend/flow/utils/redis/redis_act_playload.py +++ b/dbm-ui/backend/flow/utils/redis/redis_act_playload.py @@ -1404,7 +1404,7 @@ def get_redis_install_4_scene(self, **kwargs) -> dict: # tendisplus cluster 模式暂时不需要特别指定这两个参数 if is_twemproxy_proxy_type(self.namespace): install_payload["databases"] = int(redis_config["databases"]) - install_payload["maxmemory"] = int(float(redis_config["maxmemory"])) + # install_payload["maxmemory"] = int(float(redis_config["maxmemory"])) ##不要它了,dbmon会动态的设置 return { "db_type": DBActuatorTypeEnum.Redis.value,