[APIS-1103] Fix null error messages when several threads hit the first error at the same time - #86
Merged
Merged
Conversation
|
Reviews (1): Last reviewed commit: "fix: initialize JDBC error message table..." | Re-trigger Greptile |
hwany7seo
approved these changes
Aug 19, 2026
cubrid-submodule-bot Bot
pushed a commit
to CUBRID/cubrid
that referenced
this pull request
Aug 20, 2026
51152ed -> becb272 (2 commit(s)) CUBRID/cubrid-jdbc@51152ed...becb272 - [APIS-1105] Add PULL_REQUEST_TEMPLATE.md (CUBRID/cubrid-jdbc#87) http://jira.cubrid.org/browse/APIS-1105 - [APIS-1103] Fix null error messages when several threads hit the first error at the same time (CUBRID/cubrid-jdbc#86) http://jira.cubrid.org/browse/APIS-1103
cubrid-submodule-bot Bot
pushed a commit
to CUBRID/cubrid
that referenced
this pull request
Aug 21, 2026
51152ed -> becb272 (2 commit(s)) CUBRID/cubrid-jdbc@51152ed...becb272 - [APIS-1105] Add PULL_REQUEST_TEMPLATE.md (CUBRID/cubrid-jdbc#87) http://jira.cubrid.org/browse/APIS-1105 - [APIS-1103] Fix null error messages when several threads hit the first error at the same time (CUBRID/cubrid-jdbc#86) http://jira.cubrid.org/browse/APIS-1103
cubrid-submodule-bot Bot
pushed a commit
to CUBRID/cubrid
that referenced
this pull request
Aug 22, 2026
51152ed -> becb272 (2 commit(s)) CUBRID/cubrid-jdbc@51152ed...becb272 - [APIS-1105] Add PULL_REQUEST_TEMPLATE.md (CUBRID/cubrid-jdbc#87) http://jira.cubrid.org/browse/APIS-1105 - [APIS-1103] Fix null error messages when several threads hit the first error at the same time (CUBRID/cubrid-jdbc#86) http://jira.cubrid.org/browse/APIS-1103
Srltas
added a commit
to CUBRID/cubrid
that referenced
this pull request
Aug 22, 2026
51152ed -> becb272 (2 commit(s)) CUBRID/cubrid-jdbc@51152ed...becb272 - [APIS-1105] Add PULL_REQUEST_TEMPLATE.md (CUBRID/cubrid-jdbc#87) http://jira.cubrid.org/browse/APIS-1105 - [APIS-1103] Fix null error messages when several threads hit the first error at the same time (CUBRID/cubrid-jdbc#86) http://jira.cubrid.org/browse/APIS-1103 Co-authored-by: Srltas <49967405+Srltas@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
http://jira.cubrid.org/browse/APIS-1103
Purpose
CUBRIDJDBCErrorCode.getMessage()가 메시지 테이블을 스레드 안전하지 않게 지연 초기화합니다. 그로 인해서 여러 스레드가 동시에 첫 호출을 하면 일부가 아직 비어 있는 테이블을 조회해null을 받게 됩니다.지연 초기화를 직접 락을 걸어 방어하는 대신, JVM이 이미 락으로 보호하고 정확히 한 번만 실행하는 클래스 초기화로 옮겼습니다. 조회 경로에는 락이 남지 않으므로 Hashtable의 메서드 단위 동기화도 함께 제거합니다.
Implementation
Hashtable(조회마다 락)Remarks
N/A