Update: update network interface.#60
Conversation
6b7dc43 to
ca755a0
Compare
|
This pull request brings huge improvement to the thread model. The current implementation is ugly and inefficient. Thanks @ifplusor |
ec579ce to
7873156
Compare
stcai
left a comment
There was a problem hiding this comment.
Nice job, but there are some little problems need to fix.
| LOG_INFO("TcpRemotingClient::boost asio async service running"); | ||
|
|
||
| #if !defined(WIN32) && !defined(__APPLE__) | ||
| prctl(PR_SET_NAME, "RemotingAsioT", 0, 0, 0); |
There was a problem hiding this comment.
The thread name looks weired. Could you please name a regular one?
There was a problem hiding this comment.
suffix 'T' is thread just as 'TP' is threadpool. and i have no idea what is fitting
902b53b to
125c84e
Compare
|
This is a big improvement, it is better to verify it more carefully and then release in the next version. |
|
@ShannonDing you are right. i am tracing another infinite loop issue, it block in rebalance. and i am also testing this in my beta environment. |
29848f9 to
908517c
Compare
be1a165 to
1228032
Compare
jovany-wang
left a comment
There was a problem hiding this comment.
Great! I left some comments.
1228032 to
d1e19dd
Compare
src/common/AsyncCallbackWrap.h
Outdated
| bool bProducePullRequest); | ||
| virtual void onException(); | ||
| virtual asyncCallBackType getCallbackType() { return sendCallbackWrap; } | ||
| ~SendCallbackWrap() override = default;; |
There was a problem hiding this comment.
I think it's unnecessary to remove virtual here though it's an override.
There was a problem hiding this comment.
clion prompt to use override and remove virtual.
src/common/AsyncCallbackWrap.h
Outdated
| public: | ||
| SendCallbackWrap(const string& brokerName, const MQMessage& msg, | ||
| AsyncCallback* pAsyncCallback, MQClientAPIImpl* pclientAPI); | ||
| SendCallbackWrap(const string &brokerName, const MQMessage &msg, |
There was a problem hiding this comment.
remove using namespace std; and use std::string here.
There was a problem hiding this comment.
Nice catch, best to avoid namespace pollution.
There was a problem hiding this comment.
using namespace std;
in another head file.
| int m_requestCode; | ||
| int m_opaque; | ||
| bool m_sendRequestOK; | ||
| int64 m_timeout; // ms |
| #endif | ||
|
|
||
| // avoid async io service stops after first timer timeout callback | ||
| boost::asio::io_service::work work(m_async_ioService); |
There was a problem hiding this comment.
rename m_async_ioService to m_async_io_service
There was a problem hiding this comment.
I don't rename this variable.
5f224bd to
a164e06
Compare
ad18df4 to
4e5a8cd
Compare
0996785 to
358546a
Compare
a8b2970 to
122cd44
Compare
1e00c4e to
b3f1c5a
Compare
|
Any progress on getting this merged? |
@messense this PR is so large, and review is hard. i think we will merge it in next version, and i have more commits that are dependent on this. |
f5321b2 to
eefe849
Compare
- feature: use only one event loop for all TcpTransport. - update: network components.
…Client, TcpTransport and ReponseFunture.
eefe849 to
abb79a4
Compare
* update network interface. - feature: use only one event loop for all TcpTransport. - update: network components. * remove boost mutex, timed_mutex and condition_variable in TcpRemotingClient, TcpTransport and ReponseFunture.
* [ISSUE apache#142] save string::find result into a string::size_type variable. declare correct string::size_type by auto. (apache#143) * batch issue * Update: update network interface. (apache#60) * update network interface. - feature: use only one event loop for all TcpTransport. - update: network components. * remove boost mutex, timed_mutex and condition_variable in TcpRemotingClient, TcpTransport and ReponseFunture.
Uh oh!
There was an error while loading. Please reload this page.