Project

General

Profile

Bug #22100

ceph_perf_msgr_client only send emtpy requests except the first one

Added by Jeegn Chen almost 2 years ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/09/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

The member bufferlist data is claimed after the first invocation of m->write().
As a result, conn->send_message() only send payload of zero length in the following loops.


  class ClientThread : public Thread {
...
    bufferlist data;<<<<<<<<<<<<<<<<<<<<<<<<<<<
    void *entry() override {
      lock.Lock();
      for (int i = 0; i < ops; ++i) {
...
        m->write(0, msg_len, data); <<<<<<<<<<<
        inflight++;
        conn->send_message(m);
        //cerr << __func__ << " send m=" << m << std::endl;
      }
      lock.Unlock();
      msgr->shutdown();
      return 0;
    }

The fix may be


  class ClientThread : public Thread {
...
    bufferlist data;
    void *entry() override {
      lock.Lock();
      for (int i = 0; i < ops; ++i) {
...
        bufferlist msg_data(data); <<<<<<<<<<<<<<<<<<<<<<
        m->write(0, msg_len, msg_data); <<<<<<<<<<<<<<<<<
        inflight++;
        conn->send_message(m);
        //cerr << __func__ << " send m=" << m << std::endl;
      }
      lock.Unlock();
      msgr->shutdown();
      return 0;
    }

History

#1 Updated by John Spray almost 2 years ago

  • Project changed from mgr to RADOS

#3 Updated by Haomai Wang almost 2 years ago

  • Status changed from New to Resolved

#4 Updated by Greg Farnum 5 months ago

  • Project changed from RADOS to Messengers

Also available in: Atom PDF