Skip to content
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

- #PXC-347: Non-PRIM during membership change #101

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion asio/asio/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,19 @@
# if !defined(ASIO_HAS_TIMERFD)
# if defined(ASIO_HAS_EPOLL)
# if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
# define ASIO_HAS_TIMERFD 1
//
// Currently timerfd is a source of unidentified problems
// that break GCS unit-tests on some systems during testing
// on the Jenkins. One of these problems has been found and
// corrected: https://github.com/chriskohlhoff/asio/pull/145,
// but there is another problem, because of which some of
// compilations (on the systems with timerfd feature enabled)
// occasionally lead to failures in the GCS unit-tests, that
// may happen even after merging of the proposed correction
// (i.e. problem, which is shown above is not unique one,
// nevertheless after applying the correction probability
// of failures in the GCS unit-test sharply decreased):
//# define ASIO_HAS_TIMERFD 1
# endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
# endif // defined(ASIO_HAS_EPOLL)
# endif // !defined(ASIO_HAS_TIMERFD)
Expand Down
15 changes: 12 additions & 3 deletions asio/asio/detail/impl/epoll_reactor.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,19 @@ void epoll_reactor::run(bool block, op_queue<operation>& ops)
{
// If timeout was expired, we should read the expiration counter:
uint64_t count;
if (read(timer_fd_, &count, sizeof(count)))
ssize_t len = sizeof(count);
char * buf = reinterpret_cast<char *>(&count);
for(;;)
{
// Just to ignore return value of the read() function
// without compiler warning...
ssize_t ret = read(timer_fd_, buf, len);
if(ret == len) break;
if (ret < 0)
{
if (EINTR != errno) break;
continue;
}
buf += ret;
len -= ret;
}
}
check_timers = true;
Expand Down
9 changes: 9 additions & 0 deletions gcomm/src/evs_proto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,15 @@ gu::datetime::Date gcomm::evs::Proto::handle_timers()
{
Timer t(TimerList::value(timers_.begin()));
timers_.erase(timers_.begin());
if (state() == S_LEAVING)
{
// Due to the implementation details of the ASIO,
// timers can be triggered during the normal shutdown
// sequence, which leads to problems. We may ignore
// timers, if we are in the process of completing
// the work:
continue;
}
switch (t)
{
case T_INACTIVITY:
Expand Down
5 changes: 3 additions & 2 deletions gcomm/src/gmcast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -998,8 +998,9 @@ void gcomm::GMCast::reconnect()
{
if (ae.retry_cnt() > ae.max_retries())
{
log_info << " cleaning up " << remote_uuid << " ("
<< remote_addr << ")";
log_info << self_string()
<< " cleaning up " << remote_uuid
<< " (" << remote_addr << ")";
remote_addrs_.erase(i);
continue;//no reference to remote_addr or remote_uuid after this
}
Expand Down