Skip to content

Commit

Permalink
Correct outdated comments in code about wire protocol format (apache#477
Browse files Browse the repository at this point in the history
)

Fixes: apache#428
  • Loading branch information
merlimat authored and rdhabalia committed Jun 15, 2017
1 parent 121ed54 commit 8abafee
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,10 @@ public static ByteBuf deSerializeSingleMessageInBatch(ByteBuf uncompressedPayloa

private static ByteBuf serializeCommandMessageWithSize(BaseCommand cmd, ByteBuf metadataAndPayload) {
// / Wire format
// [TOTAL_SIZE] [CMD_SIZE][CMD] [METADATA_SIZE][METADATA] [PAYLOAD]
// [TOTAL_SIZE] [CMD_SIZE][CMD] [MAGIC_NUMBER][CHECKSUM] [METADATA_SIZE][METADATA] [PAYLOAD]
//
// metadataAndPayload contains from magic-number to the payload included


int cmdSize = cmd.getSerializedSize();
int totalSize = 4 + cmdSize + metadataAndPayload.readableBytes();
Expand Down

0 comments on commit 8abafee

Please sign in to comment.