Clone
Murtadha Makki Al Hubail
committed
on 10 Nov 17
[ASTERIXDB-1871][ASTERIXDB-2095] Stop Consumer Thread on Deallocate
- user model changes: no
- storage format changes: no
- interface change… Show more
[ASTERIXDB-1871][ASTERIXDB-2095] Stop Consumer Thread on Deallocate

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Currently there is a chance that a MaterializingPipelinedPartition

 is deallocated before the consuming thread starts (e.g. due to job

 abort) and therefore the consuming thread will not be interrupted

 leading to leaked threads and files. This change checks if partition

 was deallocated before the consumer starts, then the consumer thread

 cleans up any files then exits.

- Make TaskAttemptId non-final class to mock it.

- Add test case.

Change-Id: I18c9fb085c149f41a202fff83aa6ec3aaeba6a77

Reviewed-on: https://asterix-gerrit.ics.uci.edu/2143

Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Till Westmann <tillw@apache.org>

Show less

master + 3 more