Skip to content

send_task_state_to_scheduler may not need self.data[key] #3629

@jakirkham

Description

@jakirkham

Currently in Worker.send_task_state_to_scheduler(...), we check self.data[key] or self.actors[key] and then determine relevant metadata about that key like its nbytes and typ. While the code appears to handle access of self.nbytes with a fallback to using value, the access pattern using __getitem__, which would raise a KeyError if the key wasn't there. This makes one wonder if that fallback to get value is even needed here.

For context, this came up in this discussion ( #3628 (review) ).

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