Skip to content

Improvement: Fix locking for processing #6

@felipeblazing

Description

@felipeblazing

Currently the way we lock batches for processing (after moving from pin and unpin) is to check if we can lock something for processing, increment a counter, and then require the user to remember to create the handle from this batch. Instead of this try_to_lock_for_processing should return the handle if it works and and an error if it couldn't lock

    if (batch_ptr && batch_ptr->try_to_lock_for_processing()) {
      return {std::move(batch), data_batch_processing_handle{batch_ptr}};
    }

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