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

rgw: remove some useless codes #10057

Merged
merged 1 commit into from Oct 7, 2016

Conversation

Yan-waller
Copy link
Contributor

We have no need to genarate an oid_rand and pass it into the prepare
function, which will do nothing with oid_rand as following:

  virtual int prepare(RGWRados *_store, string *oid_rand) {
    store = _store;
    return 0;
  }

On the other hand, the RGWObjManifest::generator::create_begin will
genarate a different rand oid suffix as well as we need.

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
@xiexingguo xiexingguo added the rgw label Jun 30, 2016
@mattbenjamin mattbenjamin self-assigned this Jun 30, 2016
@mattbenjamin
Copy link
Contributor

mattbenjamin commented Jun 30, 2016

@Yan-waller , @yehudasa at first glance, should save a few cycles. however, I'm not sure if the cleanup is really complete. it would be bad if we needed a oid_rand with a different update processor--they're dynamically selected; it sort of looks like the processor prepare api may be a bit out-of-sync with the current behavior, and that the real cleanup would address that?

@Yan-waller
Copy link
Contributor Author

@mattbenjamin , @yehudasa yeah, the processor prepare api seems to be incomplete, maybe it should handle the input parameter oid_rand, store or/and set it as prefix of manifest (RGWObjManifest.set_prefix()), so that the RGWObjManifest::generator::create_begin later can use this oid_rand as what we expected ?

@Yan-waller Yan-waller force-pushed the yj-wip-rgwradosccremover-0701 branch from 13b631b to 3c14731 Compare July 1, 2016 07:28
@Yan-waller
Copy link
Contributor Author

@mattbenjamin I have fixed it, could you help to take a look?

@mattbenjamin
Copy link
Contributor

@Yan-waller this looks better, @yehudasa ?

@oritwas oritwas added the cleanup label Jul 5, 2016
@yehudasa
Copy link
Member

yehudasa commented Jul 5, 2016

@Yan-waller @mattbenjamin I think that at the moment this code would have zero effect on anything, as we'll only call prepare() with oid_rand not NULL when dealing with multipart upload, in which case this isn't going to be called. It will just add another path of untested code.

@Yan-waller Yan-waller force-pushed the yj-wip-rgwradosccremover-0701 branch from 3c14731 to 5cf6374 Compare July 7, 2016 00:35
@Yan-waller
Copy link
Contributor Author

thanks all, it's my mistake, dropped it.

@Yan-waller
Copy link
Contributor Author

retest this please

@yehudasa yehudasa merged commit a4ce1f5 into ceph:master Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants