You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/09/21 11:53:32 UTC
[GitHub] [doris] hf200012 opened a new pull request, #12824: Audit log new
hf200012 opened a new pull request, #12824:
URL: https://github.com/apache/doris/pull/12824
# Proposed changes
If it is an operation that needs to be forwarded to the master, the sql execution fails, but the status of the non-master audit log record operation is OK, but the master records ERR
The above operation also caused duplicate records, who should operate the records
The revised scheme is:
Who operates who records
If it is forward to master, the status of the operation is transmitted to the client through RPC to ensure the correctness of the status record
Issue Number: close #xxx
## Problem summary
Describe your changes.
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [ ] No
- [ ] I don't know
2. Has unit tests been added:
- [ ] Yes
- [ ] No
- [ ] No Need
3. Has document been added or modified:
- [ ] Yes
- [ ] No
- [ ] No Need
4. Does it need to update dependencies:
- [ ] Yes
- [ ] No
5. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [ ] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hf200012 commented on a diff in pull request #12824: [fix](log)Audit log status is incorrect
Posted by GitBox <gi...@apache.org>.
hf200012 commented on code in PR #12824:
URL: https://github.com/apache/doris/pull/12824#discussion_r977131942
##########
fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java:
##########
@@ -165,6 +165,16 @@ public TUniqueId getQueryId() {
}
}
+ public String getProxyStatus() {
+ if (result == null) {
+ return QueryState.MysqlStateType.UNKNOWN.name();
+ }
+ if (result.isSetStatus()) {
Review Comment:
OK
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #12824: [fix](log)Audit log status is incorrect
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12824:
URL: https://github.com/apache/doris/pull/12824#issuecomment-1254695697
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #12824: [fix](log)Audit log status is incorrect
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12824:
URL: https://github.com/apache/doris/pull/12824#issuecomment-1254695752
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] stalary commented on a diff in pull request #12824: [fix](log)Audit log status is incorrect
Posted by GitBox <gi...@apache.org>.
stalary commented on code in PR #12824:
URL: https://github.com/apache/doris/pull/12824#discussion_r977109766
##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -501,6 +501,11 @@ public TMasterOpResult forward(TMasterOpRequest params) throws TException {
context.setCurrentConnectedFEIp(clientAddr.getHostname());
ConnectProcessor processor = new ConnectProcessor(context);
TMasterOpResult result = processor.proxyExecute(params);
+ if ("ERR".equalsIgnoreCase(result.getStatus())) {
Review Comment:
```suggestion
if (QueryState.MysqlStateType.ERR.equalsIgnoreCase(result.getStatus())) {
```
##########
fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java:
##########
@@ -165,6 +165,16 @@ public TUniqueId getQueryId() {
}
}
+ public String getProxyStatus() {
+ if (result == null) {
+ return QueryState.MysqlStateType.UNKNOWN.name();
+ }
+ if (result.isSetStatus()) {
Review Comment:
Is it supposed to be `!result.isSetStatus()`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hf200012 commented on a diff in pull request #12824: [fix](log)Audit log status is incorrect
Posted by GitBox <gi...@apache.org>.
hf200012 commented on code in PR #12824:
URL: https://github.com/apache/doris/pull/12824#discussion_r977133323
##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -501,6 +501,11 @@ public TMasterOpResult forward(TMasterOpRequest params) throws TException {
context.setCurrentConnectedFEIp(clientAddr.getHostname());
ConnectProcessor processor = new ConnectProcessor(context);
TMasterOpResult result = processor.proxyExecute(params);
+ if ("ERR".equalsIgnoreCase(result.getStatus())) {
Review Comment:
QueryState.MysqlStateType.ERR.name().equalsIgnoreCase(result.getStatus())
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #12824: [fix](log)Audit log status is incorrect
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12824:
URL: https://github.com/apache/doris/pull/12824#issuecomment-1257129318
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hf200012 merged pull request #12824: [fix](log)Audit log status is incorrect
Posted by GitBox <gi...@apache.org>.
hf200012 merged PR #12824:
URL: https://github.com/apache/doris/pull/12824
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org