-
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-25768] Separate server requests to the master between the server and the client #5751
Conversation
src/connection/connection_defs.h
Outdated
SERVER_REQUEST_NEW = 5, /* new-style server request */ | ||
SERVER_REQUEST_FROM_SERVER = 3, /* let new server attach */ | ||
SERVER_REQUEST_FROM_CLIENT = 4, /* let new client process attach */ | ||
UNUSED_REQUEST = 5, /* unused request - leave it for compatibility */ |
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.
호환성을 위해 유지해야 한다면, 5가 아니라 4로 유지해야 할 것 같습니다.
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.
UNUSED_REQUEST
를 제거하여서 호환성을 유지하도록 변경하였습니다.
} | ||
else | ||
{ | ||
proc_register = (CSS_SERVER_PROC_REGISTER *) buffer; |
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.
buffer가 NULL인지 체크할 필요가 있지 않나요?
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.
assertion을 추가하였습니다.
proc_register = (CSS_SERVER_PROC_REGISTER *) buffer; | ||
server_name = proc_register->server_name; | ||
server_name_length = proc_register->server_name_length; | ||
} | ||
length = (int) strlen (server_name) + 1; |
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.
server_name이 NULL인 경우에 대해 처리가 필요할 것 같습니다.
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.
assertion을 추가하였습니다.
http://jira.cubrid.org/browse/CBRD-25768
Purpose
css_register_new_server
는 새로운 server process의 정보를 받아, cub_master에 등록하는 함수css_accept_new_reqeust
함수를 호출하여 packing 된 정보를 해체하여 cub_master에 정보를 등록한다. 이러한 상황은 두 가지로 분류된다.CSS_SERVER_PROC_REGISTER
자료구조에 정보를 담아서 master에 정보를 보낸다.위 두 상황은 서로 다른 format임에도 불구하고, 같은 request code인
SERVER_REQUEST
로 전송되고 있다.Implementation
SERVER_REQUEST_FROM_SERVER
request를 통해 요청 전송SERVER_REQUEST_FROM_CLIENT
request를 통해 요청 전송css_register_new_server
와, 정보를 unpack 하는 함수인css_accept_new_reqeust
에is_client
변수를 추가로 받도록 변경하여, 다루고 있는 process가 client 인지 정보를 추가로 전달buffer
를 그대로 server name으로 인식하고, server라면, 전달 받은buffer
를CSS_SERVER_PROC_REGISTER
로 변환하여 정보를 unpack 한다.