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

ceph-dencoder: add missing begin_iter & end_iter item for RGWObjManifest #19509

Merged
merged 1 commit into from Apr 26, 2018

Conversation

Projects
None yet
6 participants
@cooboos
Copy link

commented Dec 14, 2017

Signed-off-by: Songbo Wang wangsongbo@cloudin.cn

wangsongbo
ceph-dencoder: add missing begin_iter & end_iter item for RGWObjManifest
Signed-off-by: Songbo Wang wangsongbo@cloudin.cn
@mattbenjamin
Copy link
Contributor

left a comment

lgtm

@@ -107,6 +127,9 @@ void RGWObjManifest::dump(Formatter *f) const
::encode_json("rules", rules, f);
::encode_json("tail_instance", tail_instance, f);
::encode_json("tail_placement", tail_placement, f);

f->dump_object("begin_iter", begin_iter);

This comment has been minimized.

Copy link
@yaozongyou

yaozongyou Dec 14, 2017

Contributor

should be able to use encode_json() instead, probably better using it instead of all the direct formatter->dump() calls

This comment has been minimized.

Copy link
@cooboos

cooboos Dec 14, 2017

Author

@yaozongyou in my previous pr(#18959 ), @tchaikov suggest to use formatter's method. It confused me which should be used.
image

This comment has been minimized.

Copy link
@tchaikov

tchaikov Dec 14, 2017

Contributor

@yaozongyou well, it depends on if we are dumping a JSON or not. but in this case, i think RGWObjManifest::dump() is a method accepting a general Formatter, why shall we use encode_json()?

This comment has been minimized.

Copy link
@yaozongyou

yaozongyou Dec 14, 2017

Contributor

@tchaikov encode_json's last parameter is a general ceph::Formatter,it has the same capability with formatter->dump. and in this source code file, as the original GWObjManifest::dump using encode_json, we'd better keeping consistent with it.

This comment has been minimized.

Copy link
@tchaikov

tchaikov Dec 14, 2017

Contributor

it has the same capability with formatter->dump.

also please note that the same applies to to encode_json(). and the latter is a wrapper of the formatter->dump(), extra cpu cycles wasted if not inlined.

as the original GWObjManifest::dump using encode_json, we'd better keeping consistent with it.

Foo::dump() is a general interface used by Formatter not just JSON dump methods, it's consistent to follow this convention. but i understand, the to use encode_json() is also consistent with the rest part of this method or this source file. so no strong feelings either way. the reason i am chiming in here is merely that i am @'ed.

This comment has been minimized.

Copy link
@yaozongyou

yaozongyou Dec 14, 2017

Contributor

as @tchaikov has no favor for either way and @mattbenjamin has approved it, @cooboos let's keep it as it is.

This comment has been minimized.

Copy link
@cooboos

cooboos Dec 15, 2017

Author

@yaozongyou ok, thank you !

@tchaikov

This comment has been minimized.

Copy link
Contributor

commented Jan 10, 2018

retest this please

@tchaikov

This comment has been minimized.

Copy link
Contributor

commented Feb 11, 2018

retest this please.

@mattbenjamin mattbenjamin requested a review from yehudasa Feb 11, 2018

@mattbenjamin

This comment has been minimized.

Copy link
Contributor

commented Feb 11, 2018

@cooboos are you adding the iterator format for debugging or tracing purposes? I think that's it's only utility, but adding @yehudasa to cross check.

@yuriw

This comment has been minimized.

Copy link
Contributor

commented Feb 14, 2018

test this please

@yuriw

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2018

@yuriw yuriw merged commit 7aa5689 into ceph:master Apr 26, 2018

4 of 5 checks passed

make check (arm64) make check failed
Details
Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.