Savonitar commented on code in PR #28226:
URL: https://github.com/apache/flink/pull/28226#discussion_r3295085453


##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/ApplicationExceptionsInfoWithHistory.java:
##########
@@ -91,10 +91,11 @@ public String toString() {
     }
 
     public static ApplicationExceptionsInfoWithHistory 
fromApplicationExceptionHistory(
-            Collection<ApplicationExceptionHistoryEntry> exceptions) {
+            Collection<ApplicationExceptionHistoryEntry> exceptions, int 
maxSize) {
         return new ApplicationExceptionsInfoWithHistory(
                 new ApplicationExceptionHistory(
                         exceptions.stream()
+                                .limit(maxSize)

Review Comment:
   But which part/slice of history that gives us in the result? After this PR 
the user of this API will receive the most oldest one (it drops the most 
recent). And it looks inconsistent with JobExceptions history, which reverses 
first and as a result returns **newest**.
   Is it intentional? Or I'm missing something? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to