Skip to content
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

[CBRD-25771] Add -i option to DIAGDB for input file and update usage message #5743

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

InChiJun
Copy link

@InChiJun InChiJun commented Dec 27, 2024

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

Purpose

  • 해당 이슈는 -i 옵션을 인식할 수 있도록 구현한다.
  • -i 옵션은 다수의 클래스명을 file로 전달할 수 있게 한다.
    -i 옵션에는 클래스명이 담긴 파일이 전달되어야 한다.
    -i 옵션으로 전달된 파일을 인식할 수 있도록 한다.
    -n 옵션과 -i 옵션을 동시에 실행시킬 수 없다.

Implementation

  • DIAGDB에서 -i 옵션을 사용할 수 있게 구현
    • DIAG_INPUT_FILE_S =  diagdb에서 -i 인식하는 변수
  • diagdb -d 9 옵션 외에 다른 옵션에서 -i 기능 실행되지 않도록 구현
  • -n과 -i 옵션이 함께 실행되지 않도록 구현

Remarks

  • N/A

@InChiJun InChiJun self-assigned this Dec 27, 2024
@InChiJun InChiJun marked this pull request as draft December 27, 2024 06:20
@InChiJun InChiJun marked this pull request as ready for review December 27, 2024 07:50
@InChiJun InChiJun changed the title [CBRD-25771] Add -i option to DIAGDB for file recognition and update usage message. [CBRD-25771] Add -i option to DIAGDB for input file and update usage message Dec 27, 2024
src/executables/utility.h Outdated Show resolved Hide resolved
src/executables/util_sa.c Show resolved Hide resolved
@hornetmj hornetmj marked this pull request as draft December 27, 2024 10:07
@InChiJun InChiJun marked this pull request as ready for review December 30, 2024 22:33
src/executables/util_sa.c Outdated Show resolved Hide resolved
@InChiJun InChiJun requested review from YeunjunLee and vimkim January 3, 2025 11:13
msg/en_US.utf8/utils.msg Outdated Show resolved Hide resolved
src/executables/util_sa.c Outdated Show resolved Hide resolved
src/executables/util_sa.c Outdated Show resolved Hide resolved
src/executables/util_sa.c Outdated Show resolved Hide resolved
@InChiJun InChiJun force-pushed the CBRD-25771 branch 2 times, most recently from 30116b4 to 69ef11a Compare January 20, 2025 09:14
@InChiJun InChiJun requested a review from hornetmj January 20, 2025 09:37
{
goto print_diag_usage;
}
if (class_name && class_list_file)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (class_name && class_list_file)
if (class_name && class_list_file)

{
fprintf (outfp, "\n*** DUMP OF ALL HEAPS ***\n");
(void) file_tracker_dump_all_heap (thread_p, outfp, dump_records);
}
else
else if (class_name != NULL)
Copy link
Contributor

Choose a reason for hiding this comment

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

위에서 class_name와 class_list_file가 모두 NULL이 아닌 경우에 대한 예외처리를 수행했기 때문에 다음이 더 가독성이 좋을 수 있습니다. 다음 이슈 구현에 따라 달라질 수 있는 부분이니 해당 PR에서 고민해 보도록 하세요.

if (class_name != NULL) { // 이 경우 처리 }
else if (class_list_file != NULL { // 이 경우 처리}
else { // 전체 dump }

@hornetmj hornetmj removed the request for review from vimkim January 24, 2025 12:12
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.

5 participants