]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/Watch: use vector<> instead of list<> 39882/head
authorKefu Chai <kchai@redhat.com>
Sat, 6 Mar 2021 10:00:49 +0000 (18:00 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 7 Mar 2021 17:32:24 +0000 (01:32 +0800)
commitd4c94d2b50f9535ce847bbae3f4c5ebb3a0aa1b6
treeff236208de82fc08b6f347f8823843e6a52634c4
parent841ee688f3e1a52d5258dc19da80c3bc0bec4564
osd/Watch: use vector<> instead of list<>

there is no need to use a list<> here. and this change does not
change the encoding schema here. also, as a fact, the user of the
watch-notify feature is decoding the bufferlist like:

 std::map<std::pair<uint64_t,uint64_t>, bufferlist> reply_map;
 std::set<std::pair<uint64_t,uint64_t> > missed_map;
 decode(reply_map, reply_p);
 decode(missed_map, reply_p);

so, in this change, change list<> to vector<> for both smaller memory
footprint and for better readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/Watch.cc