arjun4084346 commented on a change in pull request #2988:
URL: https://github.com/apache/incubator-gobblin/pull/2988#discussion_r426206992
##########
File path:
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_store/MysqlSpecStore.java
##########
@@ -140,11 +172,22 @@ public boolean deleteSpec(Spec spec) throws IOException {
@Override
public boolean deleteSpec(URI specUri) throws IOException {
try (Connection connection = this.dataSource.getConnection();
- PreparedStatement statement =
connection.prepareStatement(String.format(DELETE_STATEMENT, this.tableName))) {
+ PreparedStatement statement =
connection.prepareStatement(String.format(DELETE_STATEMENT, this.tableName));
+ PreparedStatement statementV2 =
connection.prepareStatement(String.format(DELETE_STATEMENT, this.tableNameV2)))
{
+
statement.setString(1, specUri.toString());
- int result = statement.executeUpdate();
+ statementV2.setString(1, specUri.toString());
+
+ int resultV2 = statementV2.executeUpdate();
+ if (this.writeToOldTable) {
+ int result = statement.executeUpdate();
+ if (resultV2 != result) {
Review comment:
yes
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]