From: shreyanshjain7174 Date: Tue, 24 Jan 2023 14:11:58 +0000 (-0600) Subject: rados: Set snappy as default value in ms_osd_compression_algorithm instead of list... X-Git-Tag: v17.2.8~21^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8599a496363942fea3da0f89009bea244b2789b7;p=ceph.git rados: Set snappy as default value in ms_osd_compression_algorithm instead of list of algorithms. The OSDs choose the preferred algorithm based on mutual understanding between OSDs. The proposed solution to this problem was to set "snappy" as default algorithm and provide flexibility to user to change the algorithm of their choice. Fixes: https://tracker.ceph.com/issues/58410 Signed-off-by: shreyanshjain7174 (cherry picked from commit 158986a3b73a42db8e31f3366912e906c743f145) --- diff --git a/src/common/options/global.yaml.in b/src/common/options/global.yaml.in index a8a00325bde..6a5ae2b3e6e 100644 --- a/src/common/options/global.yaml.in +++ b/src/common/options/global.yaml.in @@ -1012,8 +1012,10 @@ options: type: str level: advanced desc: Compression algorithm to use in Messenger when communicating with OSD - long_desc: Compression algorithm for connections with OSD in order of preference - default: snappy zlib zstd lz4 + long_desc: Compression algorithm for connections with OSD in order of preference + Although the default value is set to snappy, a list + (like snappy zlib zstd etc.) is acceptable as well. + default: snappy services: - osd see_also: diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index d6362143880..5adcf441a8b 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -2991,6 +2991,9 @@ CtPtr ProtocolV2::handle_compression_request(ceph::bufferlist &payload) { peer_type, auth_meta->is_mode_secure()); mode != Compressor::COMP_NONE && request.is_compress()) { comp_meta.con_method = messenger->comp_registry.pick_method(peer_type, request.preferred_methods()); + ldout(cct, 10) << __func__ << " Compressor(pick_method=" + << Compressor::get_comp_alg_name(comp_meta.get_method()) + << ")" << dendl; if (comp_meta.con_method != Compressor::COMP_ALG_NONE) { comp_meta.con_mode = mode; }