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 2020/11/27 01:54:09 UTC

[GitHub] [incubator-doris] wuyunfeng opened a new issue #4970: [Doris On ES][Bug] When `random` select BE for requesting shards of ES, some incredible bug would occurs

wuyunfeng opened a new issue #4970:
URL: https://github.com/apache/incubator-doris/issues/4970


   **Describe the bug**
   
   ```
       public TNetworkAddress randomAddress(Map<String, EsNodeInfo> nodesInfo) {
           int seed = new Random().nextInt() % nodesInfo.size();
           EsNodeInfo[] nodeInfos = (EsNodeInfo[]) nodesInfo.values().toArray();
           return nodeInfos[seed].getPublishAddress();
       }
   ```
   
    1. Random().nextInt() would return negative int number resulting in `java.lang.ArrayIndexOutOfBoundsException`
    2. (EsNodeInfo[]) nodesInfo.values().toArray() this would lead `java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache.doris.external.elasticsearch.EsNodeInfo` 
   
   **To Reproduce**
   Has something to do with some `incredible` environment
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   **Desktop (please complete the following information):**
    - OS: [e.g. iOS]
    - Browser [e.g. chrome, safari]
    - Version [e.g. 22]
   
   **Smartphone (please complete the following information):**
    - Device: [e.g. iPhone6]
    - OS: [e.g. iOS8.1]
    - Browser [e.g. stock browser, safari]
    - Version [e.g. 22]
   
   **Additional context**
   


----------------------------------------------------------------
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.

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] [incubator-doris] morningman closed issue #4970: [Doris On ES][Bug] When `random` select BE for requesting shards of ES, some incredible bug would occurs

Posted by GitBox <gi...@apache.org>.
morningman closed issue #4970:
URL: https://github.com/apache/incubator-doris/issues/4970


   


----------------------------------------------------------------
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.

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