File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/com/alipay/oceanbase/rpc/bolt/transport Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -173,8 +173,12 @@ private void login() throws Exception {
173173 credential = result .getCredential ();
174174 tenantId = result .getTenantId ();
175175 // Set version if missing
176- if (ObGlobal .obVsnMajor () == 0 && ! result . getServerVersion (). isEmpty () ) {
176+ if (ObGlobal .obVsnMajor () == 0 ) {
177177 // version should be set before login when direct mode
178+ if (result .getServerVersion ().isEmpty ()) {
179+ throw new RuntimeException (
180+ "Failed to get server version from login result" );
181+ }
178182 LocationUtil .parseObVerionFromLogin (result .getServerVersion ());
179183 LOGGER .info ("The OB_VERSION parsed from login result is: {}" ,
180184 ObGlobal .OB_VERSION );
You can’t perform that action at this time.
0 commit comments