-
Notifications
You must be signed in to change notification settings - Fork 166
Update: update network interface. #60
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thread name looks weired. Could you please name a regular one?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I left some comments.
1228032 to
d1e19dd
Compare
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.
I think we should add more detail docstring for the new file like eventloop.
Also, I have not finished reviewing this such huge PR yet.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's unnecessary to remove virtual here though it's an override.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove using namespace std; and use std::string here.
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.
Nice catch, best to avoid namespace pollution.
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.
using namespace std;
in another head file.
| int m_requestCode; | ||
| int m_opaque; | ||
| bool m_sendRequestOK; | ||
| int64 m_timeout; // ms |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename m_async_ioService to m_async_io_service
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.
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.