Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/osd_types: fix the osd_stat_t::decode() #12235

Merged
merged 1 commit into from Nov 30, 2016

Conversation

tchaikov
Copy link
Contributor

should decode the deprecated num_hb_out as vector instead of uint32_t.

it's a regression introduced by 85f22ec

Signed-off-by: Kefu Chai kchai@redhat.com

should decode the deprecated num_hb_out as vector<int> instead of uint32_t.

it's a regression introduced by 85f22ec

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov tchaikov added this to the kraken milestone Nov 30, 2016
@tchaikov
Copy link
Contributor Author

@tchaikov tchaikov assigned liewegas and ghost Nov 30, 2016
@tchaikov tchaikov merged commit 63b42dd into ceph:master Nov 30, 2016
@tchaikov tchaikov deleted the wip-osd_stat_t-decode branch November 30, 2016 07:52
@liupan1111
Copy link
Contributor

liupan1111 commented Nov 30, 2016

@tchaikov thanks! it puzzled me: when encode, i passed in a uint, but why it needs vector when decode?

@tchaikov
Copy link
Contributor Author

@liupan1111 see encoding.h, b/c vector<> is encoded in two phases,

  1. encode an uint32 which is the size of vector
  2. the elements

if the size of the vector is 0, apparently we can ignore the second phase. that's why we can ignore the second phase in this case.

@liupan1111
Copy link
Contributor

@tchaikov I see. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants