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: ReplicatedBackend::prep_push() remove redundant variable assignments #14817

Merged

Conversation

Projects
None yet
5 participants
@TsaiJin
Copy link
Contributor

TsaiJin commented Apr 27, 2017

Signed-off-by: Jin Cai caijin.caij@alibaba-inc.com

@TsaiJin

This comment has been minimized.

Copy link
Contributor Author

TsaiJin commented Apr 27, 2017

@tchaikov Please help me take a look.

@@ -1572,8 +1572,8 @@ void ReplicatedBackend::prep_push(
pi.recovery_info.version = version;
pi.recovery_progress.first = true;
pi.recovery_progress.data_recovered_to = 0;
pi.recovery_progress.data_complete = 0;
pi.recovery_progress.omap_complete = 0;
pi.recovery_progress.data_complete = false;

This comment has been minimized.

Copy link
@tchaikov

tchaikov Apr 27, 2017

Contributor

@TsaiJin i think we can just remove following lines. as they are already initialized by the default ctor of ObjectRecoveryProgress

  pi.recovery_progress.first = true;
  pi.recovery_progress.data_recovered_to = 0;
  pi.recovery_progress.data_complete = 0;
  pi.recovery_progress.omap_complete = 0;

This comment has been minimized.

Copy link
@TsaiJin

TsaiJin Apr 27, 2017

Author Contributor

Yes, you are right. I will modify it by your advice.

@tchaikov

This comment has been minimized.

Copy link
Contributor

tchaikov commented Apr 27, 2017

could you prefix the title of your commit message with the subcomponent your are changing ? see https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst#3-describe-your-changes, in this case, it would be "osd: ".

@tchaikov tchaikov changed the title change initialized value of boolean type variable from int to bool osd: ReplicatedBackend::prep_push() init bool variables with boolean value Apr 27, 2017

src/osd/ReplicatedBackend.cc: remove redundant assignments which have…
… been done in constructor function

Signed-off-by: Jin Cai <caijin.caij@alibaba-inc.com>

@TsaiJin TsaiJin force-pushed the TsaiJin:wip-set-boolean-variable-with-boolean-value branch from bc77b70 to e015659 Apr 27, 2017

@TsaiJin TsaiJin changed the title osd: ReplicatedBackend::prep_push() init bool variables with boolean value osd: ReplicatedBackend::prep_push() remove redundant variable assignments Apr 27, 2017

@TsaiJin

This comment has been minimized.

Copy link
Contributor Author

TsaiJin commented Apr 27, 2017

@tchaikov I remove these unnecessary variable assignments by your advice.

@tchaikov tchaikov added the needs-qa label Apr 27, 2017

@liupan1111

This comment has been minimized.

Copy link
Contributor

liupan1111 commented Apr 27, 2017

retest this please

@yuriw yuriw merged commit ebdce96 into ceph:master Apr 28, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
arm build successfully built on arm
Details
default Build finished.
Details

@TsaiJin TsaiJin deleted the TsaiJin:wip-set-boolean-variable-with-boolean-value branch Apr 29, 2017

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.