summaryrefslogtreecommitdiffstats
path: root/src/tools/immutable_object_cache/CacheSession.cc
diff options
context:
space:
mode:
authorYuan Zhou <yuan.zhou@intel.com>2019-02-13 15:24:58 +0100
committerYuan Zhou <yuan.zhou@intel.com>2019-03-21 17:16:29 +0100
commitec48641f9e02b5ce24c1a88f65236a69ad81953a (patch)
treecc8ede003888fae70bf44961b46a6dab89d92d89 /src/tools/immutable_object_cache/CacheSession.cc
parenttools: cleanup IPC message for immutable obj cache daemon (diff)
downloadceph-ec48641f9e02b5ce24c1a88f65236a69ad81953a.tar.xz
ceph-ec48641f9e02b5ce24c1a88f65236a69ad81953a.zip
tools: use specific message for different ops in immutable obj cache daemon
use different types of message for different ops to be more efficient Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
Diffstat (limited to 'src/tools/immutable_object_cache/CacheSession.cc')
-rw-r--r--src/tools/immutable_object_cache/CacheSession.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/immutable_object_cache/CacheSession.cc b/src/tools/immutable_object_cache/CacheSession.cc
index c188e8e0b61..c72305944fc 100644
--- a/src/tools/immutable_object_cache/CacheSession.cc
+++ b/src/tools/immutable_object_cache/CacheSession.cc
@@ -91,6 +91,7 @@ void CacheSession::handle_request_data(bufferptr bp, uint64_t data_len,
bl_data.append(m_bp_header);
bl_data.append(std::move(bp));
+
ObjectCacheRequest* req = decode_object_cache_request(bl_data);
process(req);
read_request_header();
@@ -103,8 +104,6 @@ void CacheSession::process(ObjectCacheRequest* req) {
void CacheSession::send(ObjectCacheRequest* reply) {
ldout(cct, 20) << dendl;
- reply->m_data_buffer.clear();
- reply->encode();
bufferlist bl;
bl.append(reply->get_data_buffer());