]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rados: Set snappy as default value in ms_osd_compression_algorithm instead of list... 49843/head
authorshreyanshjain7174 <ssanchet@redhat.com>
Tue, 24 Jan 2023 14:11:58 +0000 (08:11 -0600)
committershreyanshjain7174 <ssanchet@redhat.com>
Tue, 31 Jan 2023 05:08:09 +0000 (23:08 -0600)
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 <ssanchet@redhat.com>
src/common/options/global.yaml.in
src/msg/async/ProtocolV2.cc

index 08d388c4e05f0971b233f9b6be056412f52432a6..d821d846c0b4a58ba796be186644db342441adc2 100644 (file)
@@ -1018,8 +1018,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:
index 65b7307430366c54bd90c1a5a3e28b2e3b8d7b4d..7cda9637d90f0f0d65f3a9c27b09e6a2043e256c 100644 (file)
@@ -3005,6 +3005,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;
     }