Build #2,506

Build: #2506 failed Changes by Taeho Kim <dittos@gmail.com>

Build result summary

Details

Completed
Duration
6 minutes
Labels
None
Revision
cb72730be1e63d8add5d9e828aee0bbccd34311f cb72730be1e63d8add5d9e828aee0bbccd34311f
Total tests
4992
Fixed in
#2510 (Changes by Simon Basle)

Tests

Responsible

No one has taken responsibility for this failure

Code commits

Author Commit Message Commit date
Taeho Kim <dittos@gmail.com> Taeho Kim <dittos@gmail.com> cb72730be1e63d8add5d9e828aee0bbccd34311f cb72730be1e63d8add5d9e828aee0bbccd34311f fix #1700 Improve cache eviction in ElasticScheduler
Currently `ElasticScheduler` uses a queue to manage the cache of
executors. When a task is finished, the free executor gets enqueued to
the queue with ttl. When a new task is scheduled, a cached executor is
dequeued from the queue (which has the oldest ttl).

Therefore an executor with the highest chance of getting evicted is
removed from the queue for reuse, which leads to the problem that
executors are unable to get evicted if tasks are scheduled at some rate
faster than `ttlSeconds`.

This commit replaces queue with deque and reuse executors in LIFO order.
Using deque may have small memory overhead of backward pointer per deque
entry, but it is much smaller than keeping unnecessary thread around.
I assume that performance hit is also small.

Tests

New test failures 1
Status Test View job Duration
Collapse Failed ElasticSchedulerTest lifoEviction History
Core 2 secs
java.lang.AssertionError: java.lang.AssertionError: [active in last rounds] 
Expecting:
 <10>
to be less than:
 <10> 
java.lang.AssertionError: [active in last rounds] 
Expecting:
 <10>
(51 more lines...)