8000 [1046] Fix NullPointerException and Refactor Connection Pool Initialization Logic by chimeyrock999 · Pull Request #1048 · Altinity/clickhouse-sink-connector · GitHub
[go: up one dir, main page]

Skip to content

[1046] Fix NullPointerException and Refactor Connection Pool Initialization Logic - #1048

Merged
subkanthi merged 3 commits into
Altinity:2.7.0from
chimeyrock999:fix/1046-nullpointerexception-dbsource
May 30, 2025
Merged

subkanthi merged 3 commits into
Altinity:2.7.0from
chimeyrock999:fix/1046-nullpointerexception-dbsource

Conversation

@chimeyrock999
@chimeyrock999 chimeyrock999 commented Apr 15, 2025 •
Copy link
Copy Markdown
Contributor

Description:

  1. Throw Exception when dbSource is null.
  2. Refactor HikariDataSource initialization logic in getInstance method. Ensure that closed HikariDataSource instances will be removed to prevent memory leak.
  3. Change HikariDbSource from HashMap to ConcurrentHashMap for more thread safety.

Benefits:

  1. Avoids potential race conditions and redundant synchronization blocks.
  2. Ensures correct connection reuse and recreation logic.
  3. Clean, thread-safe code using idiomatic ConcurrentHashMap pattern.

@subkanthi
subkanthi changed the base branch from develop to 2.7.0 April 21, 2025 00:38
@subkanthi
Copy link
Copy Markdown
Collaborator

closes: #1046

@subkanthi
subkanthi merged commit 52aa151 into Altinity:2.7.0 May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0