https://linen.dev logo
s

Subodh (Airbyte)

05/10/2021, 9:44 AM
@charles or anyone, I have a specific question around
JdbcStreamingQueryConfiguration
. I see that all the implementations of the interface are doing this
Copy code
@Override
  public void accept(Connection connection, PreparedStatement preparedStatement) throws SQLException {
    connection.setAutoCommit(false);
    preparedStatement.setFetchSize(1000);
  }
My question is why do we need to set the
AutoCommit
as false if we are just using a SELECT query to fetch the data?
u

user

05/10/2021, 6:07 PM
woof. this is a while ago.
u

user

05/10/2021, 6:07 PM
i don't remember off the top of my head why automcommit needs to be set to false.
u

user

05/10/2021, 6:08 PM
i just remember reading that it needed to be the case.
u

user

05/10/2021, 6:08 PM
sorry. that's not that helpful.
u

user

05/10/2021, 6:08 PM
you can try to run a stress test e.g.
PostgresStressTest
with the line removed and see what happens.
4 Views