Re: [DISCUSS] BP-61: Revert BP-59 to release ByteBuf using ByteBuf.release() instead of ReferenceCountUtil.safeRelease()

2023-02-02 Thread Andrey Yegorov
Netty recommends to NOT use .safeRelease() unless one absolutely needs to swallow an exception: https://github.com/netty/netty/blob/48adb2609c7210ff55bb2ae42772a579052d06e7/common/src/main/java/io/netty/util/ReferenceCountUtil.java#L107-L112 .release() is a convenient way to bypass null check if

Re: [DISCUSS] BP-61: Revert BP-59 to release ByteBuf using ByteBuf.release() instead of ReferenceCountUtil.safeRelease()

2023-02-02 Thread Enrico Olivelli
Il giorno gio 2 feb 2023 alle ore 10:57 Yan Zhao ha scritto: > > > I think that we must do something, current master branch is not stable. > > > > My colleague Massimiliano opened this issue > > https://github.com/apache/bookkeeper/issues/3751 > > > > Basically in the current master there is some

Re: [DISCUSS] BP-61: Revert BP-59 to release ByteBuf using ByteBuf.release() instead of ReferenceCountUtil.safeRelease()

2023-02-02 Thread Yan Zhao
> I think that we must do something, current master branch is not stable. > > My colleague Massimiliano opened this issue > https://github.com/apache/bookkeeper/issues/3751 > > Basically in the current master there is some problem that leads to > Netty BytBuf corruption. > > The problem is