JackieTien97 commented on code in PR #14675:
URL: https://github.com/apache/iotdb/pull/14675#discussion_r1919465356


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/sync/AuthOperationProcedure.java:
##########
@@ -221,19 +227,19 @@ public void deserialize(ByteBuffer byteBuffer) {
     }
     this.timeoutMS = ReadWriteIOUtils.readLong(byteBuffer);
     try {
-      ReadWriteIOUtils.readInt(byteBuffer);
+      int cap = ReadWriteIOUtils.readInt(byteBuffer);
+      int position = byteBuffer.position();
       this.plan = (AuthorPlan) ConfigPhysicalPlan.Factory.create(byteBuffer);
+      byteBuffer.position(cap + position);
     } catch (IOException e) {
       LOGGER.error("IO error when deserialize authplan.", e);
     }
-    if (byteBuffer.hasRemaining()) {

Review Comment:
   why removing this judgement? if you think this bytebuffer will always has 
remaining, you should add a else branch and then throw exeception



-- 
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]

Reply via email to