@@ -231,9 +231,16 @@ public Map<Long, ObPair<ObTableParam, List<ObPair<Integer, ObTableOperation>>>>
231231 for (int j = 0 ; j < rowKeySize ; j ++) {
232232 rowKey [j ] = rowKeyObject .getObj (j ).getValue ();
233233 }
234- ObPair <Long , ObTableParam > tableObPair = obTableClient .getTable (
235- tableName , rowKey , false , false ,
236- obTableClient .getRoute (batchOperation .isReadOnly ()));
234+ ObPair <Long , ObTableParam > tableObPair = null ;
235+ if (!obTableClient .isOdpMode ()) {
236+ tableObPair = obTableClient .getTable (tableName , rowKey ,
237+ false , false , obTableClient .getRoute (batchOperation .isReadOnly ()));
238+ } else {
239+ tableObPair = obTableClient .getODPTableWithRowKeyValue (tableName , rowKey , false );
240+ }
241+ if (tableObPair == null ) {
242+ throw new ObTableUnexpectedException ("fail to get table pair in batch" );
243+ }
237244 ObPair <ObTableParam , List <ObPair <Integer , ObTableOperation >>> obTableOperations = partitionOperationsMap
238245 .get (tableObPair .getLeft ());
239246 if (obTableOperations == null ) {
@@ -344,8 +351,12 @@ public void partitionExecute(ObTableOperationResult[] results,
344351 result = subObTable .execute (subRequest );
345352 if (result instanceof ObTableApiMove ) {
346353 ObTableApiMove move = (ObTableApiMove ) result ;
347- logger .warn ("The server has not yet completed the master switch, and returned an incorrect leader with an IP address of {}. " +
348- "Rerouting return IP is {}" , moveResponse .getReplica ().getServer ().ipToString (), move .getReplica ().getServer ().ipToString ());
354+ logger
355+ .warn (
356+ "The server has not yet completed the master switch, and returned an incorrect leader with an IP address of {}. "
357+ + "Rerouting return IP is {}" , moveResponse .getReplica ()
358+ .getServer ().ipToString (), move .getReplica ().getServer ()
359+ .ipToString ());
349360 throw new ObTableRoutingWrongException ();
350361 }
351362 }
0 commit comments