[
https://issues.apache.org/jira/browse/FLINK-10820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16701511#comment-16701511
]
ASF GitHub Bot commented on FLINK-10820:
----------------------------------------
pnowojski commented on issue #7051: [FLINK-10820][network] Simplify the
RebalancePartitioner implementation
URL: https://github.com/apache/flink/pull/7051#issuecomment-442358466
Personally I do not mind that much about separating PRs or creating separate
Jira issues - but that's my personal opinion which other committers might not
agree with and they might have a point. I’m personally fine with multiple
commits in one PR, some of them might be “hotfixes” some of them “jira issues”,
some of them may refer to the same jira issue.
The important things for me are:
1. one commit does one thing
2. the smaller commits the easier to review
3. renames/refactorings that do not change semantics/add new features ALWAYS
in separate commit
4. if you do multiple independent refactorings/renames, each on of them
should be in separate commit
5. two following up commits shouldn’t modify the same code (unless one is
pure refactor like deduplicating the code and another is adding feature/bug
fixing).
This speeds up reviewing and later reading the code by browsing git history
“why something was done in a way it was done” - extreme example: finding 1 line
bug fix hidden within 1000 lines of renames/refactoring is not easy. While on
the other hand, having a small commit with good commit message explaining why
something was implemented often helps a lot if you go through git annotations
in IDE.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Simplify the RebalancePartitioner implementation
> ------------------------------------------------
>
> Key: FLINK-10820
> URL: https://issues.apache.org/jira/browse/FLINK-10820
> Project: Flink
> Issue Type: Sub-task
> Components: Network
> Affects Versions: 1.8.0
> Reporter: zhijiang
> Assignee: zhijiang
> Priority: Minor
> Labels: pull-request-available
>
> _The current {{RebalancePartitioner}} implementation seems a little hacky for
> selecting a random number as the first channel index, and the following
> selections based on this random index in round-robin fashion._
> _Especially for the corner case of {{numChannels = Integer.MAX_VALUE}}, it
> would trigger next random index once reaching the last channel index.
> Actually the random index should be selected only once at the first time._
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)