Skip to content

Commit 4404916

Browse files
committed
fix: removing restriction of connection pool size for bulk import
1 parent ecb078b commit 4404916

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
99

10+
- Unrestricts the connection pool size for the Bulk Import
11+
1012
## [7.1.0] - 2024-04-25
1113

1214
- Adds queries for Bulk Import

src/main/java/io/supertokens/storage/postgresql/BulkImportProxyStorage.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public synchronized Connection getTransactionConnection() throws SQLException, S
4848
if (this.connection == null) {
4949
Connection con = ConnectionPool.getConnectionForProxyStorage(this);
5050
this.connection = new BulkImportProxyConnection(con);
51-
connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
51+
connection.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
5252
connection.setAutoCommit(false);
5353
}
5454
return this.connection;
@@ -66,15 +66,6 @@ public void commitTransaction(TransactionConnection con) throws StorageQueryExce
6666
// if any query fails while importing the user
6767
}
6868

69-
@Override
70-
public void loadConfig(JsonObject configJson, Set<LOG_LEVEL> logLevels, TenantIdentifier tenantIdentifier)
71-
throws InvalidConfigException {
72-
// We are overriding the loadConfig method to set the connection pool size
73-
// to 1 to avoid creating many connections for the bulk import cronjob
74-
configJson.addProperty("postgresql_connection_pool_size", 1);
75-
super.loadConfig(configJson, logLevels, tenantIdentifier);
76-
}
77-
7869
@Override
7970
public void initStorage(boolean shouldWait, List<TenantIdentifier> tenantIdentifiers) throws DbInitException {
8071
super.initStorage(shouldWait, tenantIdentifiers);

0 commit comments

Comments
 (0)