Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-14579 Various RESP commands are requesting wrong size for buffer #10704

Merged
merged 2 commits into from Mar 14, 2023

Conversation

wburns
Copy link
Member

@wburns wburns commented Mar 13, 2023

import io.netty.channel.ChannelHandlerContext;
import io.netty.util.CharsetUtil;

public class Resp3Handler extends Resp3AuthHandler {
private static final Log log = LogFactory.getLog(MethodHandles.lookup().lookupClass(), Log.class);
private static final ByteBuf OK = RespRequestHandler.stringToByteBuf("+OK\r\n", ByteBufAllocator.DEFAULT);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We couldn't use DEFAULT byte buffer as we want to use a byte buf that is the same type as our underlying protocol. Since netty supports both native and JVM based sockets, any ByteBuf passed down that doesn't match the same type will be first copied into an unpooled copy in the appropriate version. Thus we need to make sure this is the same type as we would configure in our server.

@tristantarrant tristantarrant merged commit 81fd8c5 into infinispan:main Mar 14, 2023
@tristantarrant
Copy link
Member

Merged, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants