Re: [PR] Remove implementation specific function name of EventDispatcher (brpc)
wwbmmm merged PR #2462: URL: https://github.com/apache/brpc/pull/2462 -- 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. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
(brpc) branch master updated: Remove implementation specific function name of EventDispatcher (#2462)
This is an automated email from the ASF dual-hosted git repository. wwbmmm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brpc.git The following commit(s) were added to refs/heads/master by this push: new 552bd306 Remove implementation specific function name of EventDispatcher (#2462) 552bd306 is described below commit 552bd30640ba5a65c7d988e5a55c623d833e35b1 Author: Divyansh200102 <146909065+divyansh200...@users.noreply.github.com> AuthorDate: Thu Feb 1 14:59:38 2024 +0530 Remove implementation specific function name of EventDispatcher (#2462) * Remove implementation specific function name of EventDispatcher * Deregister to Unregister * Update socket.cpp * Update socket.cpp * Update socket.cpp * Update socket.cpp * Update socket.cpp * Update socket.cpp * Update socket.cpp * Update socket.cpp * Update socket.cpp --- src/brpc/event_dispatcher.h | 4 ++-- src/brpc/event_dispatcher_epoll.cpp | 4 ++-- src/brpc/event_dispatcher_kqueue.cpp | 4 ++-- src/brpc/socket.cpp | 8 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/brpc/event_dispatcher.h b/src/brpc/event_dispatcher.h index d18c213e..0de74df6 100644 --- a/src/brpc/event_dispatcher.h +++ b/src/brpc/event_dispatcher.h @@ -64,12 +64,12 @@ public: // be used instead of EPOLL_CTL_ADD. When event arrives, // `Socket::HandleEpollOut' will be called with `socket_id' // Returns 0 on success, -1 otherwise and errno is set -int AddEpollOut(SocketId socket_id, int fd, bool pollin); +int RegisterEvent(SocketId socket_id, int fd, bool pollin); // Remove EPOLLOUT event on `fd'. If `pollin' is true, EPOLLIN event // will be kept and EPOLL_CTL_MOD will be used instead of EPOLL_CTL_DEL // Returns 0 on success, -1 otherwise and errno is set -int RemoveEpollOut(SocketId socket_id, int fd, bool pollin); +int UnregisterEvent(SocketId socket_id, int fd, bool pollin); private: DISALLOW_COPY_AND_ASSIGN(EventDispatcher); diff --git a/src/brpc/event_dispatcher_epoll.cpp b/src/brpc/event_dispatcher_epoll.cpp index 07d485e6..1ac7647d 100644 --- a/src/brpc/event_dispatcher_epoll.cpp +++ b/src/brpc/event_dispatcher_epoll.cpp @@ -111,7 +111,7 @@ void EventDispatcher::Join() { } } -int EventDispatcher::AddEpollOut(SocketId socket_id, int fd, bool pollin) { +int EventDispatcher::RegisterEvent(SocketId socket_id, int fd, bool pollin) { if (_epfd < 0) { errno = EINVAL; return -1; @@ -138,7 +138,7 @@ int EventDispatcher::AddEpollOut(SocketId socket_id, int fd, bool pollin) { return 0; } -int EventDispatcher::RemoveEpollOut(SocketId socket_id, +int EventDispatcher::UnregisterEvent(SocketId socket_id, int fd, bool pollin) { if (pollin) { epoll_event evt; diff --git a/src/brpc/event_dispatcher_kqueue.cpp b/src/brpc/event_dispatcher_kqueue.cpp index 614cd3bc..fa52a204 100644 --- a/src/brpc/event_dispatcher_kqueue.cpp +++ b/src/brpc/event_dispatcher_kqueue.cpp @@ -113,7 +113,7 @@ void EventDispatcher::Join() { } } -int EventDispatcher::AddEpollOut(SocketId socket_id, int fd, bool pollin) { +int EventDispatcher::RegisterEvent(SocketId socket_id, int fd, bool pollin) { if (_epfd < 0) { errno = EINVAL; return -1; @@ -136,7 +136,7 @@ int EventDispatcher::AddEpollOut(SocketId socket_id, int fd, bool pollin) { return 0; } -int EventDispatcher::RemoveEpollOut(SocketId socket_id, +int EventDispatcher::UnregisterEvent(SocketId socket_id, int fd, bool pollin) { struct kevent evt; EV_SET(&evt, fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL); diff --git a/src/brpc/socket.cpp b/src/brpc/socket.cpp index 9248dd18..1f9b2a2e 100644 --- a/src/brpc/socket.cpp +++ b/src/brpc/socket.cpp @@ -1234,7 +1234,7 @@ int Socket::WaitEpollOut(int fd, bool pollin, const timespec* abstime) { // health checker which called `SetFailed' before const int expected_val = _epollout_butex->load(butil::memory_order_relaxed); EventDispatcher& edisp = GetGlobalEventDispatcher(fd, _bthread_tag); -if (edisp.AddEpollOut(id(), fd, pollin) != 0) { +if (edisp.RegisterEvent(id(), fd, pollin) != 0) { return -1; } @@ -1246,7 +1246,7 @@ int Socket::WaitEpollOut(int fd, bool pollin, const timespec* abstime) { } // Ignore return value since `fd' might have been removed // by `RemoveConsumer' in `SetFailed' -butil::ignore_result(edisp.RemoveEpollOut(id(), fd, pollin)); +butil::ignore_result(edisp.UnregisterEvent(id(), fd, pollin)); errno = saved_errno; // Could be writable or spurious wakeup (by former epollout) return rc; @@ -1309,7 +1309,7 @@ int Socket::Connect(const timespec* abstime, // Add `sockfd' into epoll so that `H
[VOTE] Release Apache bRPC 1.8.0
Hi Apache bRPC Community, This is a call for vote to release Apache bRPC version 1.8.0 [Release Note] Feature: - Support multi bthread worker group with tag (#2358) (#2476) by @yanglimingcn - Support user callback after sending response before request/response object destruction (#2328) by @yockie - Support url safe base64 (#2337) by @chenBright - Support loongarch64 (#2364) by @zhaixiaojuan - Support compile with boringssl (#2399) by @ehds - Support user fields of baidu protocol (#2406) by @chenBright - Support client ALPN (#2251) by @Menci - Support c++20 coroutine (#2121) by @wwbmmm - Support grpc health check (#2493) by @jiangyt-git - Support A Multiple Producer, Single Consumer Queue (#2492) by @chenBright - Support async logging (#2413) by @chenBright - Support memory builtin service (#2505) by @chenBright For more information, see https://docs.qq.com/doc/DTE90a2ZQWWFyZ0tW?u=a15596253f504a87bbc28c61f7c7c568 The release candidates: https://dist.apache.org/repos/dist/dev/brpc/1.8.0/ Git tag for the release: https://github.com/apache/brpc/releases/tag/1.8.0 Release Commit ID: https://github.com/apache/brpc/commit/df31bf51f08ca6afa59ef3b4f3749bf20ebd1858 Keys to verify the Release Candidate: https://dist.apache.org/repos/dist/dev/brpc/KEYS The vote will be open for at least 72 hours or until the necessary number of votes are reached. Please vote accordingly: [ ] +1 approve [ ] +0 no opinion [ ] -1 disapprove with the reason PMC vote is +1 binding, all others are +1 non-binding. Checklist for reference: [ ] Download links are valid. [ ] Checksums and PGP signatures are valid. [ ] Source code distributions have correct names matching the current release. [ ] LICENSE and NOTICE files are correct for each brpc repo. [ ] All files have license headers if necessary. [ ] No compiled archives bundled in source archive. Regards, Weibing Wang - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
Re: [VOTE] Release Apache bRPC 1.8.0
+1 (binding) I have checked: [x] Download links are valid. [x] Checksums and PGP signatures are valid. [x] Source code distributions have correct names matching the current release. [x] LICENSE and NOTICE files are correct for each brpc repo. [x] All files have license headers if necessary. [x] No compiled archives bundled in source archive. Best regards, Weibing On 2024/02/01 09:39:35 Weibing Wang wrote: > Hi Apache bRPC Community, > > This is a call for vote to release Apache bRPC version 1.8.0 > > [Release Note] > > Feature: > - Support multi bthread worker group with tag (#2358) (#2476) by > @yanglimingcn > - Support user callback after sending response before request/response > object destruction (#2328) by @yockie > - Support url safe base64 (#2337) by @chenBright > - Support loongarch64 (#2364) by @zhaixiaojuan > - Support compile with boringssl (#2399) by @ehds > - Support user fields of baidu protocol (#2406) by @chenBright > - Support client ALPN (#2251) by @Menci > - Support c++20 coroutine (#2121) by @wwbmmm > - Support grpc health check (#2493) by @jiangyt-git > - Support A Multiple Producer, Single Consumer Queue (#2492) by @chenBright > - Support async logging (#2413) by @chenBright > - Support memory builtin service (#2505) by @chenBright > > For more information, see > https://docs.qq.com/doc/DTE90a2ZQWWFyZ0tW?u=a15596253f504a87bbc28c61f7c7c568 > > The release candidates: > https://dist.apache.org/repos/dist/dev/brpc/1.8.0/ > > Git tag for the release: > https://github.com/apache/brpc/releases/tag/1.8.0 > > Release Commit ID: > https://github.com/apache/brpc/commit/df31bf51f08ca6afa59ef3b4f3749bf20ebd1858 > > Keys to verify the Release Candidate: > https://dist.apache.org/repos/dist/dev/brpc/KEYS > > The vote will be open for at least 72 hours or until the necessary number of > votes are reached. > > Please vote accordingly: > [ ] +1 approve > [ ] +0 no opinion > [ ] -1 disapprove with the reason > > PMC vote is +1 binding, all others are +1 non-binding. > > Checklist for reference: > [ ] Download links are valid. > [ ] Checksums and PGP signatures are valid. > [ ] Source code distributions have correct names matching the current > release. > [ ] LICENSE and NOTICE files are correct for each brpc repo. > [ ] All files have license headers if necessary. > [ ] No compiled archives bundled in source archive. > > Regards, > Weibing Wang > > - > To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org > For additional commands, e-mail: dev-h...@brpc.apache.org > > - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[I] Unify bRPC third party support doc/example with the bazel WORKSPACE file (brpc)
Superskyyy opened a new issue, #2531: URL: https://github.com/apache/brpc/issues/2531 **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)** https://github.com/apache/brpc/pull/1996 **Describe the solution you'd like (描述你期望的解决方法)** The mentioned PR enabled using bRPC as a third party dependency but it is inconvenient to maintain as a subset of the workspace (i.e., sync dependency updates for protobuf). **Describe alternatives you've considered (描述你想到的折衷方案)** Let root WORKSPACE import the third party brpc_workspace.bzl. **Additional context/screenshots (更多上下文/截图)** -- 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. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
Re: [VOTE] Release Apache bRPC 1.8.0
I have checked: [x] Download links are valid. [x] Checksums and PGP signatures are valid. [x] Source code distributions have correct names matching the current release. [x] LICENSE and NOTICE files are correct for each brpc repo. [x] All files have license headers if necessary. [x] No compiled archives bundled in source archive. Regards, Xiaofeng On 2024/02/01 09:39:35 Weibing Wang wrote: > Hi Apache bRPC Community, > > This is a call for vote to release Apache bRPC version 1.8.0 > > [Release Note] > > Feature: > - Support multi bthread worker group with tag (#2358) (#2476) by > @yanglimingcn > - Support user callback after sending response before request/response > object destruction (#2328) by @yockie > - Support url safe base64 (#2337) by @chenBright > - Support loongarch64 (#2364) by @zhaixiaojuan > - Support compile with boringssl (#2399) by @ehds > - Support user fields of baidu protocol (#2406) by @chenBright > - Support client ALPN (#2251) by @Menci > - Support c++20 coroutine (#2121) by @wwbmmm > - Support grpc health check (#2493) by @jiangyt-git > - Support A Multiple Producer, Single Consumer Queue (#2492) by @chenBright > - Support async logging (#2413) by @chenBright > - Support memory builtin service (#2505) by @chenBright > > For more information, see > https://docs.qq.com/doc/DTE90a2ZQWWFyZ0tW?u=a15596253f504a87bbc28c61f7c7c568 > > The release candidates: > https://dist.apache.org/repos/dist/dev/brpc/1.8.0/ > > Git tag for the release: > https://github.com/apache/brpc/releases/tag/1.8.0 > > Release Commit ID: > https://github.com/apache/brpc/commit/df31bf51f08ca6afa59ef3b4f3749bf20ebd1858 > > Keys to verify the Release Candidate: > https://dist.apache.org/repos/dist/dev/brpc/KEYS > > The vote will be open for at least 72 hours or until the necessary number of > votes are reached. > > Please vote accordingly: > [ ] +1 approve > [ ] +0 no opinion > [ ] -1 disapprove with the reason > > PMC vote is +1 binding, all others are +1 non-binding. > > Checklist for reference: > [ ] Download links are valid. > [ ] Checksums and PGP signatures are valid. > [ ] Source code distributions have correct names matching the current > release. > [ ] LICENSE and NOTICE files are correct for each brpc repo. > [ ] All files have license headers if necessary. > [ ] No compiled archives bundled in source archive. > > Regards, > Weibing Wang > > - > To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org > For additional commands, e-mail: dev-h...@brpc.apache.org > > - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
Re: [VOTE] Release Apache bRPC 1.8.0
+1 non-binding On 2024/02/02 02:42:34 Wang Xiaofeng wrote: > I have checked: > > [x] Download links are valid. > [x] Checksums and PGP signatures are valid. > [x] Source code distributions have correct names matching the current release. > [x] LICENSE and NOTICE files are correct for each brpc repo. > [x] All files have license headers if necessary. > [x] No compiled archives bundled in source archive. > > Regards, > Xiaofeng > > On 2024/02/01 09:39:35 Weibing Wang wrote: > > Hi Apache bRPC Community, > > > > This is a call for vote to release Apache bRPC version 1.8.0 > > > > [Release Note] > > > > Feature: > > - Support multi bthread worker group with tag (#2358) (#2476) by > > @yanglimingcn > > - Support user callback after sending response before request/response > > object destruction (#2328) by @yockie > > - Support url safe base64 (#2337) by @chenBright > > - Support loongarch64 (#2364) by @zhaixiaojuan > > - Support compile with boringssl (#2399) by @ehds > > - Support user fields of baidu protocol (#2406) by @chenBright > > - Support client ALPN (#2251) by @Menci > > - Support c++20 coroutine (#2121) by @wwbmmm > > - Support grpc health check (#2493) by @jiangyt-git > > - Support A Multiple Producer, Single Consumer Queue (#2492) by @chenBright > > - Support async logging (#2413) by @chenBright > > - Support memory builtin service (#2505) by @chenBright > > > > For more information, see > > https://docs.qq.com/doc/DTE90a2ZQWWFyZ0tW?u=a15596253f504a87bbc28c61f7c7c568 > > > > The release candidates: > > https://dist.apache.org/repos/dist/dev/brpc/1.8.0/ > > > > Git tag for the release: > > https://github.com/apache/brpc/releases/tag/1.8.0 > > > > Release Commit ID: > > https://github.com/apache/brpc/commit/df31bf51f08ca6afa59ef3b4f3749bf20ebd1858 > > > > Keys to verify the Release Candidate: > > https://dist.apache.org/repos/dist/dev/brpc/KEYS > > > > The vote will be open for at least 72 hours or until the necessary number of > > votes are reached. > > > > Please vote accordingly: > > [ ] +1 approve > > [ ] +0 no opinion > > [ ] -1 disapprove with the reason > > > > PMC vote is +1 binding, all others are +1 non-binding. > > > > Checklist for reference: > > [ ] Download links are valid. > > [ ] Checksums and PGP signatures are valid. > > [ ] Source code distributions have correct names matching the current > > release. > > [ ] LICENSE and NOTICE files are correct for each brpc repo. > > [ ] All files have license headers if necessary. > > [ ] No compiled archives bundled in source archive. > > > > Regards, > > Weibing Wang > > > > - > > To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org > > For additional commands, e-mail: dev-h...@brpc.apache.org > > > > > > - > To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org > For additional commands, e-mail: dev-h...@brpc.apache.org > > - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
Re: [PR] fix compiler optimize thread local variable access (brpc)
zcfh commented on PR #2156: URL: https://github.com/apache/brpc/pull/2156#issuecomment-1922778151 遇到了和 [iss 1860](https://github.com/apache/brpc/issues/1860) 一样的问题。 项目依赖 brpc-0.9.6, 使用clang-11 加上thinlto构建项目,可能出现两种错误 ``` // 第一种 socket.cpp:1070, IsWriteComplete] Check failed: p != NULL // 第二种 task_group.cpp:623, sched_to] bthread=4294967296 sched_to itself! ``` brpc单独关闭thinlto后,和1860 一样,会出现第二种错误,但是还是能够运行。 加上这个patch后,稳定出现第一种错误,是 socket.cpp 也有类似的问题吗? -- 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. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
[I] 使用ExecutionQueue时,压测时,内存从50mb上涨到800mb,停止压测后,内存不会降下来,如果继续压测,内存还会继续涨 (brpc)
dulucy opened a new issue, #2532: URL: https://github.com/apache/brpc/issues/2532 **Describe the bug (描述bug)** --第一个class struct data{ . } class DemoTask { public: bthread::ExecutionQueueId> queue_id_one; void start(){ bthread::execution_queue_start(&queue_id_one, nullptr, insertMongoDB, nullptr); } }; int consume(void* meta, TaskIterator& iter) { if (iter.is_queue_stopped()) { return 0; } for (; iter; ++iter) { //这里使用mongo的C++驱动,将data的数据存入mongodb //从配置读取db路径 //处理数据 } return 0; } --第二个class class request(){ private: DemoTask task; bthread::ExecutionQueueId> queue_id_one; public: defualt(){ task.start(); } http(){ //将请求日志数据使用data data . bthread::execution_queue_execute(queue_id_one, data ); } } 问题 1、第一次使用brpc,不太确定是否是因为使用方式不正确导致内存没有正常释放 2、测试环境在容器云上,内存是2G,压测27万次请求,内存从50mb逐步升到800mb,停止压测后,内存一直不会降下来(这次测试有一部分是因为日志数据插入太慢) 3、修改代码后,再次测试。内存从50mb涨到500mb,确认日志数据全部插入数据库了,但是内存任然没有降下来 4、我觉得是consume方法中创建的变量等,没有正常释放(我把方法中的逻辑全部删除测试过一次,内存一直在50mb左右,没有明显的增长)。不太理解完成一次任务后,任务中的变量等什么时机释放内存的。 **To Reproduce (复现方法)** **Expected behavior (期望行为)** 了解内存不下降的原因,已经如何改进 **Versions (各种版本)** OS: Compiler: brpc:1.6.1 protobuf: **Additional context/screenshots (更多上下文/截图)** -- 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. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
Re: [PR] fix compiler optimize thread local variable access (brpc)
ehds commented on PR #2156: URL: https://github.com/apache/brpc/pull/2156#issuecomment-1923274012 > 加上这个patch后,稳定出现第一种错误,是 socket.cpp 也有类似的问题吗? 是在哪个平台上出现呢?arm 还是 x86 ? 可以贴下 PoC 代码。 -- 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. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org