This commit is contained in:
Clebert Suconic 2018-04-17 10:38:53 -04:00
commit 65be0f2041
2 changed files with 11 additions and 4 deletions

View File

@ -44,8 +44,12 @@ class JDBCFileUtils {
}
static JDBCSequentialFileFactoryDriver getDBFileDriver(DataSource dataSource, SQLProvider provider) throws SQLException {
JDBCSequentialFileFactoryDriver dbDriver;
if (POSTGRESQL.equals(PropertySQLProvider.Factory.investigateDialect(dataSource.getConnection()))) {
final JDBCSequentialFileFactoryDriver dbDriver;
final PropertySQLProvider.Factory.SQLDialect sqlDialect;
try (Connection connection = dataSource.getConnection()) {
sqlDialect = PropertySQLProvider.Factory.investigateDialect(connection);
}
if (POSTGRESQL.equals(sqlDialect)) {
dbDriver = new PostgresSequentialSequentialFileDriver(dataSource, provider);
} else {
dbDriver = new JDBCSequentialFileFactoryDriver(dataSource, provider);

View File

@ -215,8 +215,11 @@ public final class SharedStoreBackupActivation extends Activation {
// ensure that the server to which we are failing back actually starts fully before we restart
nodeManager.start();
nodeManager.awaitLiveStatus();
nodeManager.stop();
try {
nodeManager.awaitLiveStatus();
} finally {
nodeManager.stop();
}
synchronized (failbackCheckerGuard) {
if (cancelFailBackChecker || !sharedStoreSlavePolicy.isRestartBackup())