Skip to content

Commit

Permalink
fix: removing restriction of connection pool size for bulk import
Browse files Browse the repository at this point in the history
  • Loading branch information
tamassoltesz committed Sep 20, 2024
1 parent ecb078b commit 4404916
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

- Unrestricts the connection pool size for the Bulk Import

## [7.1.0] - 2024-04-25

- Adds queries for Bulk Import
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public synchronized Connection getTransactionConnection() throws SQLException, S
if (this.connection == null) {
Connection con = ConnectionPool.getConnectionForProxyStorage(this);
this.connection = new BulkImportProxyConnection(con);
connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
connection.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
connection.setAutoCommit(false);
}
return this.connection;
Expand All @@ -66,15 +66,6 @@ public void commitTransaction(TransactionConnection con) throws StorageQueryExce
// if any query fails while importing the user
}

@Override
public void loadConfig(JsonObject configJson, Set<LOG_LEVEL> logLevels, TenantIdentifier tenantIdentifier)
throws InvalidConfigException {
// We are overriding the loadConfig method to set the connection pool size
// to 1 to avoid creating many connections for the bulk import cronjob
configJson.addProperty("postgresql_connection_pool_size", 1);
super.loadConfig(configJson, logLevels, tenantIdentifier);
}

@Override
public void initStorage(boolean shouldWait, List<TenantIdentifier> tenantIdentifiers) throws DbInitException {
super.initStorage(shouldWait, tenantIdentifiers);
Expand Down

0 comments on commit 4404916

Please sign in to comment.