File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
src/main/java/com/alipay/oceanbase/rpc Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -2299,6 +2299,16 @@ public ObPayload execute(final ObTableAbstractOperationRequest request) throws E
2299
2299
if (partIdMapObTable .size () > 1 && !isDistributedExecuteSupported ) {
2300
2300
throw new ObTablePartitionConsistentException (
2301
2301
"query and mutate must be a atomic operation" );
2302
+ } else if (partIdMapObTable .isEmpty ()) {
2303
+ StringBuilder rangeInfo = new StringBuilder ();
2304
+ rangeInfo .append ("could not find part id of ranges: [" );
2305
+ for (int i = 0 ; i < tableQuery .getKeyRanges ().size (); i ++) {
2306
+ if (i > 0 ) rangeInfo .append (", " );
2307
+ ObNewRange range = tableQuery .getKeyRanges ().get (i );
2308
+ rangeInfo .append (range .getStartKey ().toString ()).append (" - " ).append (range .getEndKey ().toString ());
2309
+ }
2310
+ rangeInfo .append ("]" );
2311
+ throw new ObTableException (rangeInfo .toString ());
2302
2312
}
2303
2313
// Proceed with the operation
2304
2314
Map .Entry <Long , ObTableParam > entry = partIdMapObTable .entrySet ().iterator ().next ();
Original file line number Diff line number Diff line change @@ -135,4 +135,18 @@ public int hashCode() {
135
135
return Objects .hashCode (objs );
136
136
}
137
137
138
+ @ Override
139
+ public String toString () {
140
+ StringBuilder sb = new StringBuilder ();
141
+ sb .append ("[" );
142
+ for (int i = 0 ; i < objs .size (); i ++) {
143
+ if (i > 0 ) {
144
+ sb .append (", " );
145
+ }
146
+ ObObj obj = objs .get (i );
147
+ sb .append (obj != null ? obj .toString () : "null" );
148
+ }
149
+ sb .append ("]" );
150
+ return sb .toString ();
151
+ }
138
152
}
You can’t perform that action at this time.
0 commit comments