File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/main/java/com/alipay/oceanbase/rpc/protocol/payload/impl/execute Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ public void encode(ObByteBuf buf) {
114114 encodeHeader (buf );
115115
116116 // 1. encode index name
117- if (indexName == null || indexName . isEmpty () || indexName .compareToIgnoreCase ("PRIMARY" ) == 0 ) {
117+ if (indexName != null && indexName .compareToIgnoreCase ("PRIMARY" ) == 0 ) {
118118 buf .writeBytes (primaryIndexByteArray );
119119 } else {
120120 Serialization .encodeVString (buf , indexName );
@@ -207,8 +207,11 @@ public long getPayloadContentSize() {
207207 for (ObNewRange range : keyRanges ) {
208208 payloadContentSize += ObTableSerialUtil .getEncodedSize (range );
209209 }
210-
211- payloadContentSize += Serialization .getNeedBytes (indexName );
210+ if (indexName != null && indexName .compareToIgnoreCase ("PRIMARY" ) == 0 ) {
211+ payloadContentSize += primaryIndexByteArray .length ;
212+ } else {
213+ payloadContentSize += Serialization .getNeedBytes (indexName );
214+ }
212215 payloadContentSize += Serialization .getNeedBytes (filterString );
213216
214217 // calculate part required by HBase Batch Get
You can’t perform that action at this time.
0 commit comments