Skip to content

Conversation

@xinghuayu007
Copy link
Contributor

@xinghuayu007 xinghuayu007 commented Nov 5, 2020

Proposed changes

When a FE node forwards request to master FE node, if this node is not ready, it will get a null host and 0 port. It is not necessary to continue to create a rpc client. null host will cause a problem: Cannot open null host., like:

`
2020-11-04 23:37:16,926 WARN 12098 [StmtExecutor.execute():306] execute Exception
java.lang.Exception: Failed to get master client.
at org.apache.doris.qe.MasterOpExecutor.forward(MasterOpExecutor.java:72) ~[palo-fe.jar:?]
at org.apache.doris.qe.MasterOpExecutor.execute(MasterOpExecutor.java:56) ~[palo-fe.jar:?]
at org.apache.doris.qe.StmtExecutor.forwardToMaster(StmtExecutor.java:335) ~[palo-fe.jar:?]
at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:231) [palo-fe.jar:?]
at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:182) [palo-fe.jar:?]
at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:314) [palo-fe.jar:?]
at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:476) [palo-fe.jar:?]
at org.apache.doris.qe.ConnectProcessor.loop(ConnectProcessor.java:486) [palo-fe.jar:?]
at org.apache.doris.qe.ConnectScheduler$LoopHandler.run(ConnectScheduler.java:178) [palo-fe.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.apache.thrift.transport.TTransportException: Cannot open null host.
at org.apache.thrift.transport.TSocket.open(TSocket.java:210) ~[libthrift-0.9.3.jar:0.9.3]
at org.apache.doris.common.GenericPool$ThriftClientFactory.create(GenericPool.java:128) ~[palo-fe.jar:?]
at org.apache.doris.common.GenericPool$ThriftClientFactory.create(GenericPool.java:113) ~[palo-fe.jar:?]
at org.apache.commons.pool2.BaseKeyedPooledObjectFactory.makeObject(BaseKeyedPooledObjectFactory.java:62) ~[commons-pool2-2.2.jar:2.2]
at org.apache.commons.pool2.impl.GenericKeyedObjectPool.create(GenericKeyedObjectPool.java:1012) ~[commons-pool2-2.2.jar:2.2]
at org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:356) ~[commons-pool2-2.2.jar:2.2]
at org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:277) ~[commons-pool2-2.2.jar:2.2]
at org.apache.doris.common.GenericPool.borrowObject(GenericPool.java:89) ~[palo-fe.jar:?]
at org.apache.doris.qe.MasterOpExecutor.forward(MasterOpExecutor.java:69) ~[palo-fe.jar:?]
... 13 more

`

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • [] Bugfix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [] I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] If this change need a document change, I have updated the document
  • Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

wangxixu added 27 commits August 13, 2020 22:09
private void forward() throws Exception {
String masterHost = ctx.getCatalog().getMasterIp();
int masterRpcPort = ctx.getCatalog().getMasterRpcPort();
if (masterHost == "" || masterRpcPort == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this is better. Put it at the beginning.

if (!ctx.getCatalog().isReady()) {
    thrown new Exception("Node catalog is not ready, please wait for a while");
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe this is better. Put it at the beginning.

if (!ctx.getCatalog().isReady()) {
    thrown new Exception("Node catalog is not ready, please wait for a while");
}

agree

@morningman morningman added the kind/fix Categorizes issue or PR as related to a bug. label Nov 7, 2020
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Nov 7, 2020
@yangzhg yangzhg merged commit 17af23e into apache:master Nov 10, 2020
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Hastyshell pushed a commit to Hastyshell/doris that referenced this pull request Nov 12, 2025
…onNormal remove the streaming_label_keep_max_second set apache#56428 (apache#4844)

cherry-picks from apache#56428
Related to apache#4843

Co-authored-by: Refrain <113875799+0AyanamiRei@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants