From: Haomai Wang Date: Sun, 21 Jun 2015 16:16:59 +0000 (+0800) Subject: AsyncConnection: set out seq for message when sending ready X-Git-Tag: v9.0.3~115^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c71a2f5a6b1ad4e2122b15aa16d87ad5afaab595;p=ceph.git AsyncConnection: set out seq for message when sending ready Otherwise it will result in higher priority but later message to be issued firstly, then peer will receive out-of-order message seq Signed-off-by: Haomai Wang --- diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index c83bb4471bf5..921b9ba75072 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -1942,7 +1942,6 @@ int AsyncConnection::send_message(Message *m) prepare_send_message(f, m, bl); Mutex::Locker l(write_lock); - m->set_seq(out_seq.inc()); // "features" changes will change the payload encoding if (can_write == NOWRITE || get_features() != f) { // ensure the correctness of message encoding @@ -2245,6 +2244,7 @@ void AsyncConnection::prepare_send_message(uint64_t features, Message *m, buffer int AsyncConnection::write_message(Message *m, bufferlist& bl) { assert(can_write == CANWRITE); + m->set_seq(out_seq.inc()); if (!policy.lossy) { // put on sent list