-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[ISSUE#12994]Optimize config operation and capacity management. #13002
[ISSUE#12994]Optimize config operation and capacity management. #13002
Conversation
Thanks for your this PR. 🙏 感谢您提交的PR。 🙏 |
|
|
|
Ok
Em qua., 1 de jan. de 2025, 10:20, wuyfee ***@***.***>
escreveu:
… $\color{green}{SUCCESS}$
DETAILS <https://github.com/alibaba/nacos/actions/runs/12570842757>
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
✅ - e2e-java-test (standalone & cluster & standalone_auth): success
✅ - e2e-go-test (standalone & cluster): success
✅ - e2e-cpp-test (standalone & cluster): success
✅ - e2e-csharp-test (standalone & cluster): success
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success
—
Reply to this email directly, view it on GitHub
<#13002 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4MT7RHTE4HIKQGBB6BTEHD2IPTQDAVCNFSM6AAAAABUMCMBGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRXGAYDOMRUHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
change capacity aspect cutpoint to ConfigOperationService |
Ok
Em dom., 5 de jan. de 2025, 22:41, shiyiyue1102 ***@***.***>
escreveu:
… change capacity aspect cutpoint to ConfigOperationService
—
Reply to this email directly, view it on GitHub
<#13002 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4MT7RAQGECCROGKETAINEL2JHNL3AVCNFSM6AAAAABUMCMBGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZRHEZDAMRYHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
|
|
/** | ||
* Deletes configuration information based on the IDs list. | ||
*/ | ||
public Boolean deleteConfigs(List<Long> ids, String srcIp, String srcUser) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleteConfigs should check capacity , or can we split deleteConfigs operation to serval single deleteConfig operation in ConfigController?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we have already split batch operations on controllers, method deteConfigs should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
/** | ||
* Batch insert or update configuration information. | ||
*/ | ||
public Map<String, Object> batchInsertOrUpdate(List<ConfigAllInfo> configInfoList, String srcUser, String srcIp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all batch operation invoked ConfigOperationService single operation interface, all aspects works at single config publish & delete interface of ConfigOperationService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we have already split batch operations on controllers, method batchInsertOrUpdate should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
8a6e38c
to
2fab31d
Compare
|
@@ -70,6 +70,8 @@ public class ConfigForm implements Serializable { | |||
|
|||
private String schema; | |||
|
|||
private Boolean updateForExist = Boolean.TRUE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems that moving this param to ConfigRequestInfo may be more proper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is updateForExist means whether to update when the configuration already exists. It should be part of business logic. The ConfigRequestInfo class belong to request metadata. Irrelevant to business operations,so it seems appropriate to put it in Conform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you said, "updateForExist means whether to update when the configuration already exists", it is not a part of config itself. Conform contains things about config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, it has been moved to the ConfigRequestInfo class.
|
3c22682
to
1abdaa8
Compare
|
if (limitType != null) { | ||
return response4Limit(request, response, limitType); | ||
throw new NacosException(ErrorCode.SERVER_ERROR.getCode(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should return different error code for different limit type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
572a3eb
to
1b9d0be
Compare
|
1b9d0be
to
eb7cfcc
Compare
|
api/src/main/java/com/alibaba/nacos/api/model/v2/ErrorCode.java
Outdated
Show resolved
Hide resolved
config/src/main/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspect.java
Outdated
Show resolved
Hide resolved
config/src/main/java/com/alibaba/nacos/config/server/service/ConfigOperationService.java
Outdated
Show resolved
Hide resolved
|
|
|
What is the purpose of the change
its close #12994
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.