volcano icon indicating copy to clipboard operation
volcano copied to clipboard

Remove init variable in Reclaimable and Preemptable parts of session_plugins

Open PigNatovsky opened this issue 1 year ago • 11 comments

Hello,

it's a really small - so called - refactor. I've just changed values of init variable which shows if this is the first iteration of Reclaimable/Preemptable. In my opinion this if:

if init {
    victims = candidates
    init = false
}

is more readable than:

if !init {
    victims = candidates
    init = true
}

It's like a double negation.

PigNatovsky avatar Jun 27 '24 12:06 PigNatovsky

/assign @lowang-bh

PigNatovsky avatar Jun 27 '24 12:06 PigNatovsky

How about use inited instead of init?

lowang-bh avatar Jun 29 '24 02:06 lowang-bh

@lowang-bh @googs1025 I've pushed new commit with changes suggested by @googs1025 - as a reader I can say that it's pretty readable and I can understand a code flow.

PigNatovsky avatar Jun 29 '24 05:06 PigNatovsky

Hello Guys,

Could You comment? If changes are too small and unimportant, just let me know, I will close this.

And thank You for the previous reaponses!

PigNatovsky avatar Jul 01 '24 05:07 PigNatovsky

/assign @Monokaix
hi @Monokaix Maybe you can take a look and suggest an edit!

googs1025 avatar Jul 01 '24 06:07 googs1025

/assign @Monokaix hi @Monokaix Maybe you can take a look and suggest an edit!

I think it's ok: )

Monokaix avatar Jul 01 '24 06:07 Monokaix

/lgtm

Monokaix avatar Jul 01 '24 06:07 Monokaix

Thank You @Monokaix . And sorry for stupid question, but what should I do next?

PigNatovsky avatar Jul 01 '24 14:07 PigNatovsky

Thank You @Monokaix . And sorry for stupid question, but what should I do next?

Just wait for other approver to be reviewed and merged. 👍

googs1025 avatar Jul 02 '24 03:07 googs1025

@hudson741 @k82cn @googs1025 Is there a chance to get review/something with this small change, or should I abandon it and close?

PigNatovsky avatar Sep 02 '24 11:09 PigNatovsky

Please rebase and squash to one commit: )

Monokaix avatar Sep 02 '24 11:09 Monokaix

/assign @Monokaix

PigNatovsky avatar Oct 02 '24 13:10 PigNatovsky

/assign @Monokaix

You can just keep your own commit and remove Merge Branch xxx to kepp a clean commit: )

Monokaix avatar Oct 09 '24 07:10 Monokaix

Sorry, I was using a button in the PR UI to merge master branch, it's not the best idea. But now branch is rebased from master, my commit is on the tip.

PigNatovsky avatar Oct 09 '24 10:10 PigNatovsky

/lgtm /approve

Monokaix avatar Oct 10 '24 01:10 Monokaix

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Monokaix

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

volcano-sh-bot avatar Oct 10 '24 01:10 volcano-sh-bot

/ok-to-test

Monokaix avatar Oct 10 '24 01:10 Monokaix