flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8037) Missing cast in integer arithmetic in TransactionalIdsGenerator#generateIdsToAbort
Date Tue, 02 Jan 2018 13:10:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308021#comment-16308021
] 

ASF GitHub Bot commented on FLINK-8037:
---------------------------------------

Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5205#discussion_r159222950
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/TaskCancelThread.java
---
    @@ -49,7 +49,7 @@ public TaskCancelThread(int cancelTimeout, Thread interruptedThread,
AbstractInv
     	@Override
     	public void run() {
     		try {
    -			Thread.sleep(this.cancelTimeout*1000);
    +			Thread.sleep(this.cancelTimeout*1000L);
    --- End diff --
    
    Add spaces between `*`


> Missing cast in integer arithmetic in TransactionalIdsGenerator#generateIdsToAbort
> ----------------------------------------------------------------------------------
>
>                 Key: FLINK-8037
>                 URL: https://issues.apache.org/jira/browse/FLINK-8037
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Greg Hogan
>            Priority: Minor
>
> {code}
>   public Set<String> generateIdsToAbort() {
>     Set<String> idsToAbort = new HashSet<>();
>     for (int i = 0; i < safeScaleDownFactor; i++) {
>       idsToAbort.addAll(generateIdsToUse(i * poolSize * totalNumberOfSubtasks));
> {code}
> The operands are integers where generateIdsToUse() expects long parameter.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message