Skip to content

Feature request: run_pending_tasks method to optionally take the max number of entries to process in a call #346

@tatsuya6502

Description

@tatsuya6502

Split from #345 (comment).

And does the eviction handler then block data or threads for such a long time that the end-user observes a very long response time?

If that is the case, would it not be more handy to give the user some control over this behavior? Either beforehand by giving the run_pending_tasks() function an input u64 parameter of the maximum amount of items which can processed, and/or afterwards supply a boolean or u64 as return value containing the numbers of items which still needs to be processed...?

So, without queued delivery mode, cache writes could be blocked in the above case. As you see in the migration guide, run_pending_tasks does many types of task, so we could provide a struct with some fields to specify the maximum amounts of items to process per task type. As for the return type, it is expensive (e.g. O(n)) to count the numbers of items, which still needs to be processed. So probably we will return a stuct having the counters for the numbers of items, which were processed, per task type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions