Skip to content

Commit 39bc4cc

Browse files
committed
fix
1 parent f8f49ad commit 39bc4cc

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/main/java/com/alipay/oceanbase/rpc/protocol/payload/impl/ObTableObjType.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -382,15 +382,9 @@ public void decodeWithMeta(ByteBuf buf, ObObj obj) {
382382
}
383383

384384
public int getEncodedSizeWithMeta(ObObj obj) {
385-
int encodeSize = 0;
386-
if (obj.getEncodeSizeCache() == -1) {
387-
ObObjType objType = obj.getMeta().getType();
388-
encodeSize = DEFAULT_TABLE_OBJ_META_SIZE + objType.getEncodedSize(obj.getValue());
389-
obj.setEncodeSizeCache(encodeSize);
390-
} else {
391-
encodeSize = obj.getEncodeSizeCache();
392-
}
393-
return encodeSize;
385+
ObObjType objType = getObjType(this);
386+
int len = DEFAULT_TABLE_OBJ_META_SIZE + objType.getEncodedSize(obj.getValue());
387+
return len;
394388
}
395389

396390
public void decodeWithUtf8(ByteBuf buf, ObObj obj) {

0 commit comments

Comments
 (0)