1:修改389;390;391;392与261;262;263;264业务的表达式一致
2:优化redis连接异常时返回的异常信息
This commit is contained in:
@@ -24,6 +24,7 @@ import com.nis.util.ServiceAndRDBIndexReal;
|
||||
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.Transaction;
|
||||
import redis.clients.jedis.exceptions.JedisConnectionException;
|
||||
|
||||
@Service()
|
||||
public class ConfigJedisServiceimpl implements ConfigRedisService {
|
||||
@@ -164,8 +165,13 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
|
||||
} else {
|
||||
transaction.discard();
|
||||
}
|
||||
} catch (JedisConnectionException e) {
|
||||
//transaction.discard();
|
||||
logger.error("后台错误:连接redis异常,保存非maat类配置失败,{}",e.getMessage());
|
||||
throw new RuntimeException("后台错误:连接redis异常,保存非maat类配置失败", e);
|
||||
} catch (Exception e) {
|
||||
transaction.discard();
|
||||
logger.error("后台错误:保存非maat类配置发生了异常,{}",e.getMessage());
|
||||
throw new RuntimeException("后台错误:保存非maat类配置发生了异常", e);
|
||||
} finally {
|
||||
// 释放连接到连接池
|
||||
@@ -500,9 +506,12 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
|
||||
addStatisticsReal(configMap, transaction);
|
||||
transaction.exec();
|
||||
return true;
|
||||
}else {
|
||||
} else {
|
||||
transaction.exec();
|
||||
}
|
||||
} catch (JedisConnectionException e) {
|
||||
//transaction.discard();
|
||||
throw new RuntimeException("后台错误:连接redis异常,保存maat类配置失败", e);
|
||||
} catch (Exception e) {
|
||||
transaction.discard();
|
||||
throw new RuntimeException("后台错误:保存maat类配置发生了异常", e);
|
||||
@@ -877,6 +886,9 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
|
||||
} else {
|
||||
transaction.discard();
|
||||
}
|
||||
} catch (JedisConnectionException e) {
|
||||
//transaction.discard();
|
||||
throw new RuntimeException("后台错误:连接redis异常,删除非maat类配置失败", e);
|
||||
} catch (Exception e) {
|
||||
transaction.discard();
|
||||
throw new RuntimeException("后台错误:删除非maat类配置发生了异常", e);
|
||||
@@ -933,6 +945,9 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
|
||||
transaction.discard();
|
||||
}
|
||||
|
||||
} catch (JedisConnectionException e) {
|
||||
//transaction.discard();
|
||||
throw new RuntimeException("后台错误:连接redis异常,删除maat类配置失败", e);
|
||||
} catch (Exception e) {
|
||||
transaction.discard();
|
||||
throw new RuntimeException("后台错误:删除maat类配置发生了异常", e);
|
||||
|
||||
Reference in New Issue
Block a user