You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "bb_wolf (JIRA)" <ji...@apache.org> on 2019/01/05 16:15:00 UTC

[jira] [Comment Edited] (STORM-3256) If all thread counts exceed 32767, the system will generate errors

    [ https://issues.apache.org/jira/browse/STORM-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16734936#comment-16734936 ] 

bb_wolf edited comment on STORM-3256 at 1/5/19 4:14 PM:
--------------------------------------------------------

The detail is \apache-storm-1.1.0-src\apache-storm-1.1.0\storm-core\src\jvm\org\apache\storm\messaging\netty

package is org.apache.storm.messaging.netty  class name is MessageBatch

 
{code:java}
private void writeTaskMessage(ChannelBufferOutputStream bout, TaskMessage message) throws Exception {
        int payload_len = 0;
        if (message.message() != null)
            payload_len =  message.message().length;

        int task_id = message.task();
     if (task_id > Short.MAX_VALUE) ////////<------exceed 32767 will throw errors
            throw new RuntimeException("Task ID should not exceed "+Short.MAX_VALUE);
        
        bout.writeShort((short)task_id);
        bout.writeInt(payload_len);
        if (payload_len >0)
            bout.write(message.message());
    }
{code}
not   Line141, it is the line109

      if (task_id > Short.MAX_VALUE)  ////////<------exceed 32767 will throw errors

 

thanks


was (Author: bbwolfcool):
The detail is \apache-storm-1.1.0-src\apache-storm-1.1.0\storm-core\src\jvm\org\apache\storm\messaging\netty

package is org.apache.storm.messaging.netty  class name is MessageBatch

 

private void writeTaskMessage(ChannelBufferOutputStream bout, TaskMessage message) throws Exception {
        int payload_len = 0;
        if (message.message() != null)
            payload_len =  message.message().length;

        int task_id = message.task();
        if (task_id > Short.MAX_VALUE)  ////////<------exceed 32767 will throw errors
            throw new RuntimeException("Task ID should not exceed "+Short.MAX_VALUE);
        
        bout.writeShort((short)task_id);
        bout.writeInt(payload_len);
        if (payload_len >0)
            bout.write(message.message());
    }

not   Line141, it is the line109

      if (task_id > Short.MAX_VALUE)  ////////<------exceed 32767 will throw errors

> If all thread counts exceed 32767, the system will generate errors
> ------------------------------------------------------------------
>
>                 Key: STORM-3256
>                 URL: https://issues.apache.org/jira/browse/STORM-3256
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: storm-client
>    Affects Versions: 1.1.0
>         Environment: CentOs 7.1
>            Reporter: bb_wolf
>            Priority: Blocker
>              Labels: patch
>
> If all thread counts exceed 32767, the system will generate errors, MessageBatch.java Line141.
>  
> Storm systems are used for low latency and a linear increase in the number of concurrencies as servers increase.
> If you set up four workers per server, it's easy to achieve 4000 degrees of parallelism, that is, 4000 threads per server, then 10 servers will exceed 32767.
> Supporting only 32767 threads is a disaster for large-scale computing.
> It is hoped that this function can be improved and repaired as soon as possible.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)