Re: [incubator-brpc] annotated tag 0.9.7-rc02 updated (4cb1334 -> c8b1709)
Cool, I will make a release vote tonight. 在 2019/12/8 下午8:40,“jiashun...@apache.org” 写入: This is an automated email from the ASF dual-hosted git repository. jiashunzhu pushed a change to annotated tag 0.9.7-rc02 in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git. *** WARNING: tag 0.9.7-rc02 was modified! *** from 4cb1334 (commit) to c8b1709 (tag) tagging 4cb13348094a356eb4d5796683d8e4497c0b835a (commit) replaces 0.9.7-rc01 by zhujiashun on Sun Dec 8 20:39:32 2019 +0800 - Log - 0.9.7 release candidate 02 --- No new revisions were added by this update. Summary of changes: - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[GitHub] [incubator-brpc] zyearn opened a new issue #989: Disable some specific protocol when it is not enabled in server
zyearn opened a new issue #989: Disable some specific protocol when it is not enabled in server URL: https://github.com/apache/incubator-brpc/issues/989 If server doesn't support rtmp, redis, etc., we want to skip the request parsing process using these protocols. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[GitHub] [incubator-brpc] jamesge commented on a change in pull request #972: Redis server protocol
jamesge commented on a change in pull request #972: Redis server protocol URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r355397430 ## File path: src/brpc/redis_reply.h ## @@ -160,6 +212,87 @@ inline int64_t RedisReply::integer() const { return 0; } +inline bool RedisReply::SetNilString() { +if (!_arena || _has_set) return false; +_type = REDIS_REPLY_STRING; +_length = npos; +_has_set = true; +return true; +} + +inline bool RedisReply::SetArray(int size) { +if (!_arena || _has_set) { +return false; +} +_type = REDIS_REPLY_ARRAY; +if (size < 0) { +_length = npos; +return true; +} else if (size == 0) { +_length = 0; +return true; +} +RedisReply* subs = (RedisReply*)_arena->allocate(sizeof(RedisReply) * size); +if (!subs) { +LOG(FATAL) << "Fail to allocate RedisReply[" << size << "]"; +return false; +} +for (int i = 0; i < size; ++i) { +new (&subs[i]) RedisReply(_arena); +} +_length = size; +_data.array.replies = subs; +_has_set = true; +return true; +} + +inline bool RedisReply::SetBasicString(const std::string& str, RedisReplyType type) { Review comment: 同上 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[GitHub] [incubator-brpc] jamesge commented on a change in pull request #972: Redis server protocol
jamesge commented on a change in pull request #972: Redis server protocol URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r355397364 ## File path: src/brpc/redis_reply.h ## @@ -160,6 +212,87 @@ inline int64_t RedisReply::integer() const { return 0; } +inline bool RedisReply::SetNilString() { +if (!_arena || _has_set) return false; +_type = REDIS_REPLY_STRING; +_length = npos; +_has_set = true; +return true; +} + +inline bool RedisReply::SetArray(int size) { Review comment: 这么长也inline? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[GitHub] [incubator-brpc] jamesge commented on a change in pull request #972: Redis server protocol
jamesge commented on a change in pull request #972: Redis server protocol URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r355392122 ## File path: src/brpc/policy/redis_protocol.cpp ## @@ -52,62 +58,249 @@ struct InputResponse : public InputMessageBase { } }; -// "Message" = "Response" as we only implement the client for redis. -ParseResult ParseRedisMessage(butil::IOBuf* source, Socket* socket, - bool /*read_eof*/, const void* /*arg*/) { -if (source->empty()) { -return MakeParseError(PARSE_ERROR_NOT_ENOUGH_DATA); +static bool ParseArgs(const RedisReply& message, std::unique_ptr* args) { Review comment: 输入应该直接是command字符串,不要用RedisReply转一下了 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[GitHub] [incubator-brpc] jamesge commented on a change in pull request #972: Redis server protocol
jamesge commented on a change in pull request #972: Redis server protocol URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r355397799 ## File path: src/brpc/redis_reply.h ## @@ -160,6 +212,87 @@ inline int64_t RedisReply::integer() const { return 0; } +inline bool RedisReply::SetNilString() { +if (!_arena || _has_set) return false; +_type = REDIS_REPLY_STRING; +_length = npos; +_has_set = true; +return true; +} + +inline bool RedisReply::SetArray(int size) { +if (!_arena || _has_set) { +return false; +} +_type = REDIS_REPLY_ARRAY; +if (size < 0) { +_length = npos; +return true; +} else if (size == 0) { +_length = 0; +return true; +} +RedisReply* subs = (RedisReply*)_arena->allocate(sizeof(RedisReply) * size); +if (!subs) { +LOG(FATAL) << "Fail to allocate RedisReply[" << size << "]"; +return false; +} +for (int i = 0; i < size; ++i) { +new (&subs[i]) RedisReply(_arena); +} +_length = size; +_data.array.replies = subs; +_has_set = true; +return true; +} + +inline bool RedisReply::SetBasicString(const std::string& str, RedisReplyType type) { +if (!_arena || _has_set) { +return false; +} +const size_t size = str.size(); +if (size < sizeof(_data.short_str)) { +memcpy(_data.short_str, str.c_str(), size); +_data.short_str[size] = '\0'; +} else { +char* d = (char*)_arena->allocate((size/8 + 1) * 8); +if (!d) { +LOG(FATAL) << "Fail to allocate string[" << size << "]"; +return false; +} +memcpy(d, str.c_str(), size); +d[size] = '\0'; +_data.long_str = d; +} +_type = type; +_length = size; +_has_set = true; +return true; +} + +inline bool RedisReply::SetStatus(const std::string& str) { +return SetBasicString(str, REDIS_REPLY_STATUS); +} + +inline bool RedisReply::SetError(const std::string& str) { +return SetBasicString(str, REDIS_REPLY_ERROR); +} + +inline bool RedisReply::SetInteger(int64_t value) { Review comment: nice-to-have:SetInteger是一个常见操作,越简单越好 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[GitHub] [incubator-brpc] jamesge commented on a change in pull request #972: Redis server protocol
jamesge commented on a change in pull request #972: Redis server protocol URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r355393947 ## File path: src/brpc/policy/redis_protocol.h ## @@ -33,6 +33,11 @@ ParseResult ParseRedisMessage(butil::IOBuf* source, Socket *socket, bool read_eo // Actions to a redis response. void ProcessRedisResponse(InputMessageBase* msg); +// Actions to a redis request, which is left unimplemented. +// All requests are processed in execution queue pushed in +// the parsing process. +void ProcessRedisRequest(InputMessageBase* msg); Review comment: 这个可以在注释里说明一下 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[GitHub] [incubator-brpc] jamesge commented on a change in pull request #972: Redis server protocol
jamesge commented on a change in pull request #972: Redis server protocol URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r355398301 ## File path: src/brpc/server.cpp ## @@ -1588,7 +1589,8 @@ void Server::GenerateVersionIfNeeded() { if (!_version.empty()) { return; } -int extra_count = !!_options.nshead_service + !!_options.rtmp_service + !!_options.thrift_service; +int extra_count = !!_options.nshead_service + !!_options.rtmp_service + +!!_options.thrift_service + !!_options.redis_service; Review comment: nice-to-have: xxx_service为空时不加对应的handler。 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[GitHub] [incubator-brpc] zyearn opened a new issue #990: Support server protocol parsing order without changing ProtocolType(options.proto)
zyearn opened a new issue #990: Support server protocol parsing order without changing ProtocolType(options.proto) URL: https://github.com/apache/incubator-brpc/issues/990 One possible plan: define an order for every protocol, ``` TypeOrder[] = { {PROTOCOL_BAIDU_STD , 100} , {PROTOCOL_STREAMING_RPC, 200}, } ``` and sort the protocol in handlers according to the number that followed. The interval between two protocol should be large enough to adapt to more protocols in future. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[GitHub] [incubator-brpc] jamesge commented on issue #990: Support server protocol parsing order without changing ProtocolType(options.proto)
jamesge commented on issue #990: Support server protocol parsing order without changing ProtocolType(options.proto) URL: https://github.com/apache/incubator-brpc/issues/990#issuecomment-563229628 the number for ordering should be passed to RegisterProtocol This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[VOTE] Release Apache brpc(incubating) 0.9.7-rc02
Hi, guys, 0.9.7-rc02 is ready for vote, here it is. I am pleased to be calling this vote for the release of apache brpc(incubating) 0.9.7-rc02. The source code can be found at: https://dist.apache.org/repos/dist/dev/incubator/brpc/0.9.7-rc02/incubator-brpc-0.9.7-rc02.tar.gz The release candidate has been tagged in GitHub as 0.9.7-rc02, available here: https://github.com/apache/incubator-brpc/releases/tag/0.9.7-rc02 The SHA-512 checksum is: ec57b40641734dad8f2ab9629b75a658ef35da5248b1bef8af17298f2722f18106f48d1a4bf2a4f98b2a23d9fa0c727f95863ae762ddb4c67cb02a8848ee0851 which can be found via: https://dist.apache.org/repos/dist/dev/incubator/brpc/0.9.7-rc02/incubator-brpc-0.9.7-rc02.tar.gz.sha512 The signature can be found via: https://dist.apache.org/repos/dist/dev/incubator/brpc/0.9.7-rc02/incubator-brpc-0.9.7-rc02.tar.gz.asc KEYS file is available here: https://dist.apache.org/repos/dist/dev/incubator/brpc/KEYS [Release Note] * Fix many license related issues * Health (of a connection) can be checked at rpc-level * Fix SSL-related compilation issues on Mac * Support SSL-replacement lib MesaLink * Support consistent hashing with ketama algo. * bvar variables can be exported for prometheus services * String[Multi]Splitter supports '\0' as separator * Support for bilibili discovery service * Improved CircuitBreaker * grpc impl. supports timeout Please vote on releasing this package as: Apache brpc(incubating) 0.9.7-rc02 This vote will be open until “Dec 14 2019 00:00:00 GMT+0800 (CST)" and passes if a majority of at least three +1 Apache brpc IPMC votes are cast. [ ] +1 Release this package [ ] 0 I don't feel strongly about it, but don't object [ ] -1 Do not release this package because... Checklist for reference: [ ]Are release files in correct location? [ ]Do release files have the word incubating in their name? [ ] Are the digital signature and hashes correct? [ ] Does DISCLAIMER file exist? [ ]Do LICENSE and NOTICE files exists? [ ] Is the LICENSE and NOTICE text correct? [ ] Is the NOTICE year correct? [ ] Un-included software dependencies are not mentioned in LICENSE or NOTICE? [ ] License information is not mentioned in NOTICE? Is there any 3rd party code contained inside the release? If so: [ ] Does the software have a compatible license? [ ] Are all software licenses mentioned in LICENSE? [ ] Is the full text of the licenses (or pointers to it) in LICENSE? Is any of this code Apache licensed? Do they have NOTICE files? If so: [ ]Have relevant parts of those NOTICE files been added to this NOTICE file? [ ]Do all source files have ASF headers? [ ] Do the contents of the release match with what's tagged in version control? [ ] Are there any unexpected binary files in the release? [ ] Can you compile from source? Are the instruction clear? Anyone can participate in testing and voting, not just committers, please feel free to try out the release candidate and provide your votes. Thanks
[GitHub] [incubator-brpc] mistyliu commented on issue #954: 支持腾讯开源rpc框架tars使用的tars协议
mistyliu commented on issue #954: 支持腾讯开源rpc框架tars使用的tars协议 URL: https://github.com/apache/incubator-brpc/issues/954#issuecomment-563741404 仅验证使用的话,可以参考目前brpc中支持thrift的模式,通过变通的方式引入tars协议。 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org