ptupitsyn commented on a change in pull request #252:
URL: https://github.com/apache/ignite-3/pull/252#discussion_r680811383
##########
File path:
modules/client-common/src/main/java/org/apache/ignite/client/proto/ClientMessageDecoder.java
##########
@@ -78,13 +73,10 @@ private boolean readMagic(ByteBuf byteBuf) {
if (byteBuf.readableBytes() < MAGIC_BYTES.length)
return false;
- assert data.length == MAGIC_BYTES.length;
-
- byteBuf.readBytes(data, 0, MAGIC_BYTES.length);
+ var data = new byte[MAGIC_BYTES.length];
Review comment:
1. The first 4 bytes of every client connection must contain the magic
header, as per
[IEP-76](https://cwiki.apache.org/confluence/display/IGNITE/IEP-76+Thin+Client+Protocol+for+Ignite+3.0)
2. New `ClientMessageDecoder` instance is created for every `Channel`
(connection) thanks to `ChannelInitializer`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]