-
Notifications
You must be signed in to change notification settings - Fork 124
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-25603] Revive cub_server that is started by cubrid server start command #5534
Open
YeunjunLee
wants to merge
2
commits into
CUBRID:feature/server_revive_2
Choose a base branch
from
YeunjunLee:CBRD-25603
base: feature/server_revive_2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
hornetmj
reviewed
Oct 14, 2024
@@ -171,7 +171,8 @@ server_monitor::revive_server (const std::string &server_name) | |||
// true after the first evaluation. Therefore, evaluating the timediff only once when producing the REVIVE_SERVER job is needed. | |||
// (Currently, it is impossible since registered_time is stored in server_entry, which is not synchronized structure between monitor and main thread.) | |||
|
|||
if (timediff > SERVER_MONITOR_UNACCEPTABLE_REVIVE_TIMEDIFF_IN_SECS) | |||
if (entry->second.get_registered_time() == std::chrono::steady_clock::time_point () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- registered_time라는 표현이 더이상 유효하지 않습니다.
- last_revived_time 등의 표기가 더 적합하다고 봅니다.
- 멤버 변수, 함수 반영
- 여기서 m_registered_time의 값을 결정하기 보다는 timediff를 구할 때 반영하는게 문맥 이해가 쉬울 것 같습니다.
- if (entry->second.get_registered_time() == std::chrono::steady_clock::time_point ()) timediff = SERVER_MONITOR_UNACCEPTABLE_REVIVE_TIMEDIFF_IN_SECS + 1; 등
- 또는 bool is_first_try = entry->second.get_registered_time() == std::chrono::steady_clock::time_point ()) timediff; (저는 이것이 더 명확해 보이네요.)
- if (is_first_try || timediff > SERVER_MONITOR_UNACCEPTABLE_REVIVE_TIMEDIFF_IN_SECS) 등
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last_revived_time
으로 멤버 변수와 함수에 모두 변경하였습니다.is_first_try
보단revived_before = entry->second.get_registered_time() != std::chrono::steady_clock::time_point ()
가 더 적합한 표현이라고 생각합니다. 이와 같이 변경하였습니다. 해당 부분은timediff
를 구하는 부분으로 이동하였습니다.
YeunjunLee
force-pushed
the
CBRD-25603
branch
from
October 14, 2024 06:31
c6f851e
to
34481a4
Compare
hornetmj
approved these changes
Oct 14, 2024
H2SU
approved these changes
Oct 17, 2024
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/CBRD-25603
Purpose
cubrid server start
를 통해 구동된 cub_server의 경우, 120초 이내에 kill 되더라도, 재구동 되어야 한다.Implementation
server_entry
를 제거하지 않고, 정상적으로 종료된 cub_server의 경우에만server_entry
를 제거하기 때문에,cubrid server start
를 통해 cub_server 가 구동되는 경우에만 새로운server_entry
가 생성된다.server_entry
를 생성하는 경우에는std::chrono::steady_clock::time_point()
를 통해 null time을 삽입하고, revive job에서 이를 확인하는 과정을 통해 timediff가 120초를 넘지 않아도 재구동을 시키도록 조건문을 변경한다.