]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg: reset ProtocolV2's frame assembler in appropriate thread 48255/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 27 Jul 2022 12:10:05 +0000 (12:10 +0000)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Mon, 26 Sep 2022 13:13:45 +0000 (20:13 +0700)
commitd05861d831f864ff33cd34e2a0f844ee056dc0f7
tree0d723dc30fdb5078a21a015f7bd209e54d3f4605
parente3b54c2cf33fa0b0998e4b2ef08296e062dee14e
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