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

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

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

    https://github.com/apache/flink/pull/2837#discussion_r88906146
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionVertex.java
 ---
    @@ -38,9 +39,10 @@
     
        public ArchivedExecutionVertex(ExecutionVertex vertex) {
                this.subTaskIndex = vertex.getParallelSubtaskIndex();
    -           this.priorExecutions = new ArrayList<>();
    -           for (Execution priorExecution : vertex.getPriorExecutions()) {
    -                   priorExecutions.add(priorExecution.archive());
    +           EvictingBoundedList<Execution> copyOfPriorExecutionsList = 
vertex.getCopyOfPriorExecutionsList();
    +           this.priorExecutions = new 
ArrayList<>(copyOfPriorExecutionsList.size());
    +           for (Execution priorExecution : copyOfPriorExecutionsList) {
    +                   priorExecutions.add(priorExecution != null ? 
priorExecution.archive() : null);
    --- End diff --
    
    Why don't we use the `EvictingBoundedList` here instead of copying all 
elements, also those not being contained in the EvictingBoundedList over to an 
`ArrayList`? Should save some space.


> Job Manager goes out of memory from long history of prior execution attempts
> ----------------------------------------------------------------------------
>
>                 Key: FLINK-5107
>                 URL: https://issues.apache.org/jira/browse/FLINK-5107
>             Project: Flink
>          Issue Type: Bug
>          Components: JobManager
>            Reporter: Stefan Richter
>            Assignee: Stefan Richter
>
> We have observed that the job manager can run out of memory during long 
> running jobs with many vertexes. Analysis of the heap dump shows, that the 
> ever-growing history of prior execution attempts is the culprit for this 
> problem.
> We should limit this history to a number of n most recent attempts. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to