Project

General

Profile

Actions

Bug #13462

closed

object_info_t::decode() has wrong version

Added by David Zafman over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
David Zafman
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
hammer, firefly
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The decode version is current 14 when it should be 15 to match the encode version. This is in firefly, hammer and master.

It doesn't break anything now, but if we ever bump the compatv to 15 the decode would throw an exception when it would be a compatible decode.

This problem was introduced in 13b9dc70 when the encode went from 13 -> 14 and the decode wasn't changed. Later changes increased both by 1 but didn't match them up.


void object_info_t::encode(bufferlist& bl) const
{
  object_locator_t myoloc(soid);
  map<entity_name_t, watch_info_t> old_watchers;
  for (map<pair<uint64_t, entity_name_t>, watch_info_t>::const_iterator i =
         watchers.begin();
       i != watchers.end();
       ++i) {
    old_watchers.insert(make_pair(i->first.second, i->second));
  }
  ENCODE_START(15, 8, bl);

void object_info_t::decode(bufferlist::iterator& bl)
{
  object_locator_t myoloc;
  DECODE_START_LEGACY_COMPAT_LEN(14, 8, 8, bl);


Related issues 2 (0 open2 closed)

Copied to Ceph - Backport #13487: object_info_t::decode() has wrong versionRejectedSamuel JustActions
Copied to Ceph - Backport #13488: object_info_t::decode() has wrong versionResolvedAbhishek VarshneyActions
Actions

Also available in: Atom PDF