You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "runzhiwang (Jira)" <ji...@apache.org> on 2020/12/06 05:17:00 UTC

[jira] [Updated] (RATIS-1207) Fix duplicated StreamMap.Key

     [ https://issues.apache.org/jira/browse/RATIS-1207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

runzhiwang updated RATIS-1207:
------------------------------
    Description: 
Currently we use channelId_streamId as the stream key, but if we start the first client, and finish the streaming, then we start the second client, error happens. Because the channel id of the second client is same as the first client, and streamId is both 0, so duplicated stream key happens. So we can use clientid_streamid as the stream key, to achieve this, we need put clientid in DataStreamPacketImpl

{code:java}
final StreamMap.Key key = new StreamMap.Key(ctx.channel().id(), request.getStreamId());
{code}


  was:
Currently we use channelId_streamId as the stream key, but if we start the first client, and finish the streaming, then we start the second client, error happens. Because the channel id of the second client is same as the first client, and streamId is both 0, so duplicated key happens. So we can use clientid_streamid as the stream key, to achieve this, we need put clientid in DataStreamPacketImpl

{code:java}
final StreamMap.Key key = new StreamMap.Key(ctx.channel().id(), request.getStreamId());
{code}



> Fix duplicated StreamMap.Key
> ----------------------------
>
>                 Key: RATIS-1207
>                 URL: https://issues.apache.org/jira/browse/RATIS-1207
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: runzhiwang
>            Assignee: runzhiwang
>            Priority: Major
>
> Currently we use channelId_streamId as the stream key, but if we start the first client, and finish the streaming, then we start the second client, error happens. Because the channel id of the second client is same as the first client, and streamId is both 0, so duplicated stream key happens. So we can use clientid_streamid as the stream key, to achieve this, we need put clientid in DataStreamPacketImpl
> {code:java}
> final StreamMap.Key key = new StreamMap.Key(ctx.channel().id(), request.getStreamId());
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)