Skip to content

Commit

Permalink
refactor: rename runDropStage to runDropStageWithRecovery
Browse files Browse the repository at this point in the history
  • Loading branch information
yas-okadatech committed Nov 7, 2024
1 parent 364ecd6 commit f383ccf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/embulk/output/SnowflakeOutputPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ public ConfigDiff transaction(
snowflakeCon.runCreateStage(stageIdentifier);
configDiff = super.transaction(config, schema, taskCount, control);
if (t.getDeleteStage()) {
runDropStage(snowflakeCon, stageIdentifier, task);
runDropStageWithRecovery(snowflakeCon, stageIdentifier, task);
}
} catch (Exception e) {
if (t.getDeleteStage() && t.getDeleteStageOnError()) {
try {
runDropStage(snowflakeCon, stageIdentifier, task);
runDropStageWithRecovery(snowflakeCon, stageIdentifier, task);
} catch (SQLException ex) {
throw new RuntimeException(ex);
}
Expand All @@ -231,7 +231,7 @@ public ConfigDiff transaction(
return configDiff;
}

private void runDropStage(
private void runDropStageWithRecovery(
SnowflakeOutputConnection snowflakeCon, StageIdentifier stageIdentifier, PluginTask task)
throws SQLException {
try {
Expand Down

0 comments on commit f383ccf

Please sign in to comment.