Skip to content

MappedByteBufferSource's ASYNC_FLUSH_EXECUTOR never shut down #38

@ljacomet

Description

@ljacomet

org.terracotta.offheapstore.disk.paging.MappedPageSource.ASYNC_FLUSH_EXECUTOR
is an instance of org.terracotta.offheapstore.util.Retryer and owns an executor which is not shut down.

This is my ugly workaround:

Field retryerField = MappedPageSource.class.getDeclaredField("ASYNC_FLUSH_EXECUTOR");
retryerField.setAccessible(true);

Retryer retryer = (Retryer) retryerField.get(null);

Field executorField = Retryer.class.getDeclaredField("executor");
ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor) executorField.get(retryer);

executor.shutdown();

Copied from ehcache/ehcache3#1444

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions