[
https://issues.apache.org/jira/browse/GOBBLIN-1713?focusedWorklogId=811371&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-811371
]
ASF GitHub Bot logged work on GOBBLIN-1713:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Sep/22 19:29
Start Date: 22/Sep/22 19:29
Worklog Time Spent: 10m
Work Description: phet commented on code in PR #3567:
URL: https://github.com/apache/gobblin/pull/3567#discussion_r978012393
##########
gobblin-utility/src/main/java/org/apache/gobblin/util/jdbc/DataSourceProvider.java:
##########
@@ -81,6 +81,8 @@ public DataSourceProvider(@Named("dataSourceProperties")
Properties properties)
}
public DataSourceProvider() {
+ LOG.warn("Creating {} without setting validation query. Stacktrace of
current thread {}",
+ this.getClass().getSimpleName(),
Thread.currentThread().getStackTrace());
Review Comment:
because this is a `StackTraceElement[]`, `.toString` will be ugly. you may
want something like:
```
Arrays.toString(st).replace(", ", "\n at ")
```
or
```
String.join("\n at", st.stream().map(x -> x.toString()).collect(...))
```
##########
gobblin-metastore/src/main/java/org/apache/gobblin/metastore/JobHistoryDataSourceProvider.java:
##########
@@ -33,6 +33,7 @@ public class JobHistoryDataSourceProvider extends
org.apache.gobblin.util.jdbc.D
@Inject
public JobHistoryDataSourceProvider(@Named("dataSourceProperties")
Properties properties) {
+ super(properties);
Review Comment:
line 40 and 41 look like they guard the call
Issue Time Tracking
-------------------
Worklog Id: (was: 811371)
Time Spent: 40m (was: 0.5h)
> Add validation check for mysql connection
> ------------------------------------------
>
> Key: GOBBLIN-1713
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1713
> Project: Apache Gobblin
> Issue Type: New Feature
> Reporter: Urmi Mustafi
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Detect once a MySQL connection becomes read-only. Enforce verification when
> this happens, so we know to create new, replacement connections (to a
> read-write host). Adding this check to a code path that was missing this
> check.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)