ruanwenjun commented on code in PR #14473:
URL:
https://github.com/apache/dolphinscheduler/pull/14473#discussion_r1257448036
##########
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/datasource/AbstractDataSourceProcessor.java:
##########
@@ -109,6 +109,6 @@ protected Map<String, String>
transformOtherParamToMap(String other) {
public String getDatasourceUniqueId(ConnectionParam connectionParam,
DbType dbType) {
BaseConnectionParam baseConnectionParam = (BaseConnectionParam)
connectionParam;
return MessageFormat.format("{0}@{1}@{2}@{3}", dbType.getDescp(),
baseConnectionParam.getUser(),
-
PasswordUtils.encodePassword(baseConnectionParam.getPassword()),
baseConnectionParam.getJdbcUrl());
+
PasswordUtils.encodePassword(baseConnectionParam.getPassword()),
getJdbcUrl(connectionParam));
Review Comment:
Agree with @huaibingshifu's solution. Instead of updating the old
datasource, I would like to create a new datasource in cache.
But it's better to generate the id by ConnectionParam's hashcode? since in
some datasource there may exist other extra field.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]