The low level store depends on the background daemon for a lot of critical tasks like cache I/O, checkpoints, deleted space management.
I don't think you can currently queue to this from outside of store,
and would like to discuss if it would be a good idea to allow that.

For work in something like DERBY-3788, it would be nice for the user thread doing compile to be able to queue a unit of work to be done in background at low priority to update statistics. This unit of work
might take awhile for a huge table so I worry about putting it on the
store queue, at least as the daemon is currently implemented.

Another example of these high level tasks might be automatic background checking of some sort for compressing space out of tables/indexes.

I am thinking it might be better to have a different daemon for these high level background tasks. And maybe to conserve threads the daemon thread should not even be started until the first request is made. So zero admin default could be something like no deamon thread until work queued and daemon shut down when no work on queue. Advanced work might be to make it more dynamic and allow for more threads if on a multi-processor.

Reply via email to