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

librados: use cursor for nobjects listing #13323

Merged
merged 6 commits into from Mar 7, 2017

Conversation

Projects
None yet
2 participants
@yehudasa
Member

yehudasa commented Feb 9, 2017

This includes also the changes that are in #13149, and replaces #12399. Unlike the older PR that it replaces, it leverages the ObjectCursor type that has been added for a new pool listing api (aka v3).

rados_object_list_cursor c_cursor;
};
CEPH_RADOS_API std::ostream& operator<<(std::ostream& os, const rados_object_list_cursor& c);
CEPH_RADOS_API std::ostream& operator<<(std::ostream& os, const librados::ObjectCursor& oc);

This comment has been minimized.

@liewegas

liewegas Feb 9, 2017

Member

Hmm, we don't do this with other parts of the librados.hpp... doesn't hurt I guess, but is it needed?

This comment has been minimized.

@yehudasa

yehudasa Feb 9, 2017

Member

This is a copy paste of:
CEPH_RADOS_API std::ostream& operator<<(std::ostream& out, const librados::ListObject& lop);. Not sure whether it's needed or not.

public:
ObjectCursor();
ObjectCursor(const ObjectCursor &rhs);
ObjectCursor(rados_object_list_cursor c) : c_cursor(c) {}

This comment has been minimized.

@liewegas

liewegas Feb 9, 2017

Member

I'd add 'explicit' here so users don't accidentally do the conversion

@@ -3372,6 +3372,33 @@ uint32_t Objecter::list_nobjects_seek(NListContext *list_context,
return pos;
}
uint32_t Objecter::list_nobjects_seek(NListContext *list_context,
const hobject_t *cursor)

This comment has been minimized.

@liewegas

liewegas Feb 9, 2017

Member

nit: const hobject_t& cursor here?

@liewegas

This comment has been minimized.

Member

liewegas commented Feb 9, 2017

a few nits aside this looks good to me!

@liewegas

This comment has been minimized.

Member

liewegas commented Feb 14, 2017

@yehudasa needs rebase

liewegas and others added some commits Feb 2, 2017

PendingReleaseNotes: notes about object listing API removal
Signed-off-by: Sage Weil <sage@redhat.com>
objecter: append list of returned objects in pool listing
Instead of merging it. The returned list is in the correct order,
whereas merging it breaks this order.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
objecter: new calls to support cursor with nobjects
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
@yehudasa

This comment has been minimized.

Member

yehudasa commented Feb 28, 2017

jenkins retest this please

yehudasa added some commits Feb 8, 2017

librados: ObjectCursor adjustments and additions
add missing constructor, operators, and to/from str functionality

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
librados: nobjects list get and seek to cursor
cursor is of ObjectCursor type

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
test/librados: extend pool list test to include cursor
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
@yehudasa

This comment has been minimized.

Member

yehudasa commented Mar 1, 2017

jenkins retest this please

@liewegas liewegas merged commit 3f5269d into ceph:master Mar 7, 2017

2 of 3 checks passed

default Build finished.
Details
Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment