odc icon indicating copy to clipboard operation
odc copied to clipboard

enhancement(connection): optimize error message when testing the connection to an OceanBase backup instance

Open MarkPotato777 opened this issue 1 year ago • 1 comments

What type of PR is this?

type-enhancement module-connection

What this PR does / why we need it:

This PR refined the error message when testing the connection to an OceanBase instance. If it is OBOracle mode and executes SELECT USER_ID FROM ALL_USERS WHERE ROWNUM < 1, if it's a backup instance, then it will cause an error message 'ErrorCode = 16000, SQLState = HY000, Details = ORA-16000: standby cluster support weak read only'. We catch this message and then inform users to set ob_read_consistency to WEAK in Advanced Settings.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:


MarkPotato777 avatar Apr 15 '24 11:04 MarkPotato777

how about provide a impl of ConnectionAdapter to determine whether a datasource is standby cluster?

yhilmare avatar Apr 15 '24 12:04 yhilmare