Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/alicloud_ess_scaling_rule: optimize query rule #7827

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fuliu-zln
Copy link
Contributor

No description provided.

d.SetId(response.ScalingRuleId)

_, ok := d.GetOk("alarm_dimension")
d.SetId(fmt.Sprint("false", ":", response.ScalingRuleId))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么需要拼接上一个bool值

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为在查询伸缩规则的时候,因为当前后端和CMS之间请求方式的原因 如果查询伸缩规则的时候,同时查询报警任务
可能会出现超时的情况;而目前伸缩规则只有当资源设置了AlarmDimension的时候,才必须查报警任务,而其他场景则不需要查报警任务;查询伸缩规则时,只有请求的AlarmRule设置了True 才查报警任务,否则就不查报警任务,避免绝大多数场景因查伸缩规则的时候同时查报警任务导致查询超时的异常,临时解决绝大部分TF用户查询伸缩组的超时异常。当然这块后续还需要ESS后端和CMS共同优化查询时间太长这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants