-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Mongo client support #2171
base: master
Are you sure you want to change the base?
Mongo client support #2171
Conversation
6e1cd9c
to
e5a2355
Compare
Signed-off-by: helei.sig11 <[email protected]>
Signed-off-by: helei.sig11 <[email protected]>
e5a2355
to
ee12867
Compare
Mongo client有专门的支持naming service和load balancer吗?不是用目前brpc已有的支持naming service和load balancer? |
mongodb 是支持主从和分片的,我觉得可以做成专用的lb和naming service,这块的细节还没怎么看 |
@@ -152,6 +152,7 @@ endif() | |||
|
|||
find_package(Protobuf REQUIRED) | |||
find_package(Threads REQUIRED) | |||
find_package (bson-1.0 1.7 REQUIRED) |
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.
这个是不是做成一个可选的编译选项比较好
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.
ok, 整个mongo的client支持都做成一个编译选项吧
ProcessMongoRequest, NULL, | ||
SerializeMongoRequest, | ||
PackMongoRequest, | ||
ProcessMongoRequest, |
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.
ProcessMongoRequest还要保留吗?
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端了,mongo协议变动挺大的。要做前后兼容工作量有点大
LOG(WARNING) << "method count:" << srv_des->method_count() | ||
<< " of MongoService should be equal to 1!"; | ||
LOG(WARNING) << "method count: " << srv_des->method_count() | ||
<< "of MongoService should be equal to 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.
这个空格不应该删吧
} | ||
|
||
bool bson_get_double(bson_t* doc, const char *key, double *value) { | ||
assert(doc); |
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.
这个可以用DCHECK?
不支持auth? |
What problem does this PR solve?
support mongo client
原pr:#1808
官方reference: https://www.mongodb.com/docs/manual/
目前能够demo插入和查询,还需要做的:
Issue Number:
#1807
Problem Summary:
What is changed and the side effects?
Changed:
Side effects:
Performance effects(性能影响):
Breaking backward compatibility(向后兼容性):
影响mongo protocol的server端的向后兼容。
Mongo protocol 本身已经不再向前兼容
Check List: