Skip to content

[CBRD-26010] Fix backup hang with different max_clients settings in [common] and [@db] sections in conf file #6102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 14, 2025

Conversation

InChiJun
Copy link
Contributor

@InChiJun InChiJun commented Apr 9, 2025

http://jira.cubrid.org/browse/CBRD-26010

Purpose

  • cubrid.conf 파일 구성 시 [common] 섹션과 [@db] 섹션의 max_clients 값을 다르게 설정하면 backup 수행 시 hang이 발생합니다.
  • 이는 서버 시작 시 core의 개수를 설정할 때 [common] 섹션의 max_clients 값만 참조하기 때문입니다.
  • 이에 core의 개수 설정 시 cubrid.conf 파일의 [@db] 섹션까지 참조하도록 합니다.

Implementation

  • 처음 cubrid.conf 파일 load 시 [@db] 섹션까지 참조하도록 구현

Remarks

N/A

@InChiJun InChiJun self-assigned this Apr 9, 2025
@InChiJun InChiJun marked this pull request as ready for review April 9, 2025 09:31
@InChiJun InChiJun requested a review from beyondykk9 as a code owner April 9, 2025 09:31
@InChiJun InChiJun marked this pull request as draft April 9, 2025 09:32
@InChiJun InChiJun marked this pull request as ready for review April 9, 2025 09:56
@@ -1117,7 +1117,7 @@ net_server_start (const char *server_name)
goto end;
}

sysprm_load_and_init (NULL, NULL, SYSPRM_LOAD_ALL);
sysprm_load_and_init (server_name, NULL, SYSPRM_LOAD_ALL);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net_server_start() -> boot_restart_server() 호출을 통해 sysprm_load_and_init()는 총 3번 호출되어 집니다. 다음 정보가 추가로 제공되어야 하겠습니다.

  1. net_server_start()에서 수정한 이유
  2. 수정 후 나머지 sysprm_load_and_init()를 그대로 둔 이유
  3. 불필요해서 제거될 수 있는 것은 없는지 여부가 검토되었는지 여부

Copy link
Contributor Author

@InChiJun InChiJun Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 서버가 시작되고 처음 실행되는 sysprm_load_and_init()에서 server_name이 전달되어야 core의 개수를 설정할 때 [@db] 섹션 값까지 참조되게 됩니다.
    • 서버가 시작되고 net_server_start() 함수에서 sysprm_load_and_init() 함수가 처음 호출됩니다.
  2. 나머지 sysprm_load_and_init() 함수에서도 db_name을 전달하도록 수정하였습니다.
    • db_name이 전달되어야 [@db] 섹션 값까지 참조하기 때문에 해당 PR 과정에서 호출되는 모든 sysprm_load_and_init() 함수에는 db_name이 전달되는 것이 맞습니다.
  3. 3번의 호출 중 불필요한 것은 없습니다.

@InChiJun InChiJun changed the title [CBRD-26010]Fix backup hang with different max_clients settings in [common] and [@db] sections in conf file [CBRD-26010] Fix backup hang with different max_clients settings in [common] and [@db] sections in conf file Apr 10, 2025
@InChiJun InChiJun requested review from hornetmj and H2SU April 10, 2025 07:36
@@ -2104,7 +2104,7 @@ boot_restart_server (THREAD_ENTRY * thread_p, bool print_restart, const char *db
}

#if defined(SERVER_MODE)
if (sysprm_load_and_init (NULL, NULL, SYSPRM_LOAD_ALL) != NO_ERROR)
if (sysprm_load_and_init (db_name, NULL, SYSPRM_LOAD_ALL) != NO_ERROR)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앞선 질문에 이여서 질문드립니다. '3. 3번의 호출 중 불필요한 것은 없습니다.' 없다고 답변해 주셨는데, 아래에서 호출되는 sysprm_load_and_init (boot_Db_full_name, NULL, SYSPRM_LOAD_ALL)가 호출되어야 하는 이유가 있나요?

Copy link
Contributor Author

@InChiJun InChiJun Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sysprm_load_and_init (boot_Db_full_name, NULL, SYSPRM_LOAD_ALL) 에서의 호출은 중복 호출이기 때문에 필요 없는 호출입니다.
삭제하여 반영하겠습니다.

@InChiJun InChiJun requested a review from hornetmj April 11, 2025 04:20
@hornetmj hornetmj merged commit 6dca2bf into CUBRID:develop Apr 14, 2025
10 checks passed
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.

6 participants