Skip to content

Commit

Permalink
ceph_test_msgr: clean previous sent queue infos
Browse files Browse the repository at this point in the history
1. A -> B
2. goto standby
3. B mark down
4. A reconnect to B
5. got reset session and dispatch remote reset
6. because remote reset is executed in DispatchQueue, it will be delayed
7. A -> B successfully and begin to send message
8. assert because we found the first message is missing but it's reasonble

if policy.resetcheck is true

Signed-off-by: Haomai Wang <haomai@xsky.com>
  • Loading branch information
yuyuyu101 committed Jul 7, 2016
1 parent 5d4a58c commit bb1c912
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/test/msgr/test_msgr.cc
Expand Up @@ -777,12 +777,24 @@ class SyntheticDispatcher : public Dispatcher {
}

void ms_handle_fast_connect(Connection *con) {
lock.Lock();
Mutex::Locker l(lock);
list<uint64_t> c = conn_sent[con];
for (list<uint64_t>::iterator it = c.begin();
it != c.end(); ++it)
sent.erase(*it);
conn_sent.erase(con);
got_connect = true;
cond.Signal();
lock.Unlock();
}
void ms_handle_fast_accept(Connection *con) { }
void ms_handle_fast_accept(Connection *con) {
Mutex::Locker l(lock);
list<uint64_t> c = conn_sent[con];
for (list<uint64_t>::iterator it = c.begin();
it != c.end(); ++it)
sent.erase(*it);
conn_sent.erase(con);
cond.Signal();
}
bool ms_dispatch(Message *m) {
assert(0);
}
Expand Down

0 comments on commit bb1c912

Please sign in to comment.