We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
/// @brief Get the unique id of the current request. uint32_t GetRequestId() const { return invoke_info_.seq_id; }
这个seq_id是调用的唯一ID么,这里看到框架是通过请求的request_id设置的,而且只是一个uint32_t, 这里怎么保证seq_id是全局唯一的呢 context->SetRequestId(req->req_header.request_id());
这里应该 是使用一个uuid,或用雪花算法类的ID吧
The text was updated successfully, but these errors were encountered:
这里seq_id的唯一性是指具体某个连接上请求的唯一性,局部的唯一性,如果想在当前服务节点上,得到请求的唯一性,可以通过conn_id(连接id)+请求seq_id,如果是要得到全局请求的唯一,就需要类似上面所说的uuid或雪花算法来得到了。
Sorry, something went wrong.
No branches or pull requests
/// @brief Get the unique id of the current request.
uint32_t GetRequestId() const { return invoke_info_.seq_id; }
这个seq_id是调用的唯一ID么,这里看到框架是通过请求的request_id设置的,而且只是一个uint32_t, 这里怎么保证seq_id是全局唯一的呢
context->SetRequestId(req->req_header.request_id());
这里应该 是使用一个uuid,或用雪花算法类的ID吧
The text was updated successfully, but these errors were encountered: