-
Notifications
You must be signed in to change notification settings - Fork 123
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-25292] [CBRD-25389] COMMIT/ROLLBACK 시 PL에서 사용된 query handler를 지연해서 제거 #5698
Conversation
…s called, query handlers should not be freed immediately, they should be accessable with limitation (e.g.) closed cursor)
@@ -207,9 +208,11 @@ namespace cubmethod | |||
} | |||
} | |||
|
|||
/* DDL audit */ | |||
if (handler) | |||
if (handler != nullptr) |
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.
if (handler != nullptr) | |
else |
@@ -199,6 +199,7 @@ namespace cubmethod | |||
{ | |||
// add to statement handler cache | |||
m_sql_handler_map.emplace (sql, handler->get_id ()); | |||
handler->set_tran_id (tid); |
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.
valid한 tid인지 체크할 필요는 없나요?
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.
TRANID는 서버에서 설정된 값을 보내주므로 여기서는 valid 체크가 필요 없습니다.
{ | ||
delete *it; | ||
} | ||
m_deferred_query_free_handler.clear(); |
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.
nullptr 체크는 안해도 될까요?
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.
네 포인터가 아닌 멤버변수입니다
설명 remark 에 CBRD-25272는 아마도 오타겠지요? |
http://jira.cubrid.org/browse/CBRD-25292
Description
CBRD-25292, CBRD-25389는 COMMIT, ROLLBACK 시 PL의 Static SQL, Dynamic SQL 생성 시 만들어지는 method_query_handler 객체에 대해서, COMMIT , ROLLBACK 시 객체가 바로 제거되어서 이미 할당 해제된 메모리를 접근하기 때문에 발생한다.
COMMIT, ROLLBACK 되더라도, 이전에 생성한 질의 핸들러와 커서는 제한적으로 접근이 가능해야하기 때문에 바로 제거하지 않고, deferred free list에 넣어둔 후 libcas 모드 (PL 실행 모드) 를 벗어나는 시점에 지연하여 제거하도록 수정한다.
Implementation
Remarks
이슈의 이유로 CAS core 발생 후 인터럽트 에러 처리 동기화 문제로, PL 세션 종료가 끝나지 않아 서버 종료가 되지 않는 문제로 regression 테스트가 진행되지 않으므로 CBRD-25272의 일부 변경을 적용했다.