@@ -329,7 +329,10 @@ public TableEntry refreshPartitionLocation(TableEntry tableEntry, String tableNa
329329 throw e ;
330330 } catch (ObTableSchemaVersionMismatchException e ) {
331331 RUNTIME .error (
332- "refresh partition location meet schema_version mismatched exception" , e );
332+ "refresh partition location meet schema_version mismatched exception, tryTimes: {}" , i , e );
333+ if (i >= retryTimes - 1 ) {
334+ throw e ;
335+ }
333336 long schemaVersion = tableEntry .getSchemaVersion ();
334337 // sleep over waiting interval of refreshing meta to refresh meta
335338 long interval = System .currentTimeMillis ()
@@ -340,7 +343,7 @@ public TableEntry refreshPartitionLocation(TableEntry tableEntry, String tableNa
340343 tableEntry = locations .get (tableName );
341344 // if schema_version has been updated, directly retry
342345 if (schemaVersion == tableEntry .getSchemaVersion ()) {
343- refreshMeta (tableName , serverRoster , sysUA );
346+ tableEntry = refreshMeta (tableName , serverRoster , sysUA );
344347 }
345348 } catch (ObTableEntryRefreshException e ) {
346349 RUNTIME .error ("refresh partition location meet entry refresh exception" , e );
@@ -453,7 +456,10 @@ public TableEntry refreshTabletLocationBatch(TableEntry tableEntry, String table
453456 throw e ;
454457 } catch (ObTableSchemaVersionMismatchException e ) {
455458 RUNTIME .error (
456- "refresh location in batch meet schema_version mismatched exception" , e );
459+ "refresh location in batch meet schema_version mismatched exception, tryTimes: {}" , i , e );
460+ if (i >= retryTimes - 1 ) {
461+ throw e ;
462+ }
457463 long schemaVersion = tableEntry .getSchemaVersion ();
458464 // sleep over waiting interval of refreshing meta to refresh meta
459465 long interval = System .currentTimeMillis ()
@@ -464,7 +470,7 @@ public TableEntry refreshTabletLocationBatch(TableEntry tableEntry, String table
464470 tableEntry = locations .get (tableName );
465471 // if schema_version has been updated, directly retry
466472 if (schemaVersion == tableEntry .getSchemaVersion ()) {
467- refreshMeta (tableName , serverRoster , sysUA );
473+ tableEntry = refreshMeta (tableName , serverRoster , sysUA );
468474 }
469475 } catch (ObTableEntryRefreshException e ) {
470476 RUNTIME .error ("refresh location in batch meet entry refresh exception" , e );
0 commit comments