Do not throw when exception happens in JdbcPageSink::abort
@@ -22,6 +22,7 @@ import com.facebook.presto.spi.type.Type;
import com.google.common.collect.ImmutableList;
import com.google.common.primitives.Shorts;
import com.google.common.primitives.SignedBytes;
+import io.airlift.log.Logger;
import io.airlift.slice.Slice;
import org.joda.time.DateTimeZone;
@@ -58,6 +59,8 @@ import static org.joda.time.chrono.ISOChronology.getInstanceUTC;
public class JdbcPageSink
implements ConnectorPageSink
{
+ private static final Logger log = Logger.get(JdbcPageSink.class);
+
private final Connection connection;
private final PreparedStatement statement;
@@ -195,7 +198,8 @@ public class JdbcPageSink
connection.rollback();
}
catch (SQLException e) {
- throw new PrestoException(JDBC_ERROR, e);
+ // Exceptions happened during abort do not cause any real damage so ignore them
+ log.debug(e, "SQLException when abort");
}
}
