From: Joao Eduardo Luis Date: Fri, 19 Sep 2014 16:16:49 +0000 (+0100) Subject: common: LogEntry: if channel is missing, default to "cluster" X-Git-Tag: v0.86~37^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c378aebcbae49b8909ba598b307add7b7a23082;p=ceph.git common: LogEntry: if channel is missing, default to "cluster" Keeps backward compatibility when there are entities that do not know what a channel is. This way we ensure that those messages are logged as they were expected to be before channels were introduced: to the cluster log. Signed-off-by: Joao Eduardo Luis --- diff --git a/src/common/LogEntry.cc b/src/common/LogEntry.cc index 42389f0f2c87..f3fb989cc894 100644 --- a/src/common/LogEntry.cc +++ b/src/common/LogEntry.cc @@ -188,7 +188,10 @@ void LogEntry::decode(bufferlist::iterator& bl) if (struct_v >= 3) { ::decode(channel, bl); } else { - channel = CLOG_CHANNEL_DEFAULT; + // prior to having logging channels we only had a cluster log. + // Ensure we keep that appearance when the other party has no + // clue of what a 'channel' is. + channel = CLOG_CHANNEL_CLUSTER; } DECODE_FINISH(bl); }