]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msg: reset ProtocolV2's frame assembler in appropriate thread 47931/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 27 Jul 2022 12:10:05 +0000 (12:10 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 2 Sep 2022 16:49:12 +0000 (16:49 +0000)
commita9f794fa9a8769e679c6179758cc2829b4077a0b
tree52e4f882422d1c1b2ebb692f9378bd03f342ef3e
parenta326c5c4a443f71f286dcfafb1faaa8abdd1c29a
msg: reset ProtocolV2's frame assembler in appropriate thread

`set_is_rev1()` actually resets the internal state of `FrameAssembler`,
so -- to avoid racing -- it should be performed by the same thread that
takes care about executing `ProtocolV2::write_message()`.

```cppp
void set_is_rev1(bool is_rev1) {
  m_descs.clear();
  m_flags = 0;
  m_is_rev1 = is_rev1;
}
```

See comments in the tracker for analysis.

Fixes: https://tracker.ceph.com/issues/55851
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
(cherry picked from commit c04256bab85ebf97daa8805daacdea17013381b7)
src/msg/async/ProtocolV2.cc