@@ -628,6 +628,10 @@ private static String getTableNameByGroupNameFromRemote(Connection connection, T
628628 while (rs .next ()) {
629629 realTableName = rs .getString ("table_name" );
630630 }
631+ } catch (SQLException e ) {
632+ RUNTIME .error ("getTableNameByGroupNameFromRemote meet SQL exception" , e );
633+ throw new ObTableEntryRefreshException (format ("fail to get table name from remote, key=%s" ,
634+ key ), e , true );
631635 } catch (ObTableNotExistException e ) {
632636 // avoid to refresh meta for ObTableNotExistException
633637 RUNTIME .error ("getTableNameByGroupNameFromRemote meet exception" , e );
@@ -672,7 +676,8 @@ TableEntry execute(Connection connection) throws ObTableEntryRefreshException {
672676
673677 private static void getObVersionFromRemote (final Connection connection )
674678 throws ObTableEntryRefreshException ,
675- FeatureNotSupportedException {
679+ FeatureNotSupportedException ,
680+ SQLException {
676681 PreparedStatement ps = null ;
677682 ResultSet rs = null ;
678683 try {
@@ -684,6 +689,8 @@ private static void getObVersionFromRemote(final Connection connection)
684689 } else {
685690 throw new ObTableEntryRefreshException ("fail to get ob version from remote" );
686691 }
692+ } catch (SQLException e ) {
693+ throw e ;
687694 } catch (FeatureNotSupportedException e ) {
688695 throw e ;
689696 } catch (Exception e ) {
@@ -704,7 +711,8 @@ private static void getObVersionFromRemote(final Connection connection)
704711
705712 // check tenant exist or not
706713 private static int checkTenantExistFromRemote (final Connection connection , TableEntryKey key )
707- throws ObTableEntryRefreshException {
714+ throws ObTableEntryRefreshException ,
715+ SQLException {
708716 try (PreparedStatement ps = connection .prepareStatement (OB_TENANT_EXIST_SQL )) {
709717 ps .setString (1 , key .getTenantName ());
710718 try (ResultSet rs = ps .executeQuery ()) {
@@ -713,9 +721,13 @@ private static int checkTenantExistFromRemote(final Connection connection, Table
713721 } else {
714722 return rs .getInt ("tenant_id" );
715723 }
724+ } catch (SQLException e ) {
725+ throw e ;
716726 } catch (Exception e ) {
717727 throw new ObTableEntryRefreshException ("fail to get tenant id from remote" , e );
718728 }
729+ } catch (SQLException e ) {
730+ throw e ;
719731 } catch (Exception e ) {
720732 throw new ObTableEntryRefreshException ("fail to get tenant id from remote" , e );
721733 }
0 commit comments