You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by 陈旭 <ch...@meituan.com.INVALID> on 2020/01/20 03:07:25 UTC

Is there any race conditions with the ServerCall?

I think there are no race conditions with the following methods

hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerCall.java

public synchronized void setResponse(Message m, final CellScanner cells, Throwable t, String errorMsg)

public synchronized void setCallBack(RpcCallback callback)

public synchronized BufferChain getResponse()

hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyServerCall.java

public synchronized void sendResponseIfReady()

can we remove the synchronized here? thanks.

Re: Is there any race conditions with the ServerCall?

Posted by Stack <st...@duboce.net>.
On Mon, Jan 20, 2020 at 7:19 AM 陈旭 <ch...@meituan.com.invalid> wrote:

> I think there are no race conditions with the following methods
>
> hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerCall.java
>
> public synchronized void setResponse(Message m, final CellScanner cells,
> Throwable t, String errorMsg)
>
> public synchronized void setCallBack(RpcCallback callback)
>
> public synchronized BufferChain getResponse()
>
> hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyServerCall.java
>
> public synchronized void sendResponseIfReady()
>
> can we remove the synchronized here? thanks.
>

Try it? Hopefully it just works.
S