Issue #5668
closedUsing futures in sysncpipeline basically deactivates batching
Description
Currently, when using await
on the result of get_or_create_future
of a DeclarativeContent
without marking it as unable to batch, will most likely lead to deadlocks, when the future is awaited, while the content is waiting for a batch to be filled.
The related PR: https://github.com/pulp/pulpcore/pull/365
provides the possibility that a DeclarativeContent
can be batched and will wait until its associated future is actually awaited. At that very moment it is marked as no longer able to batch up, and it signals the queue it is in to flush the current (incomplete) batch.
This change is completely backwards compatible. It only adds the possibility to use the futures without specifying does_batch=False
.
If used reasonably, it can help to increase sync performance in some cases.
Add resolution callback to DeclarativeContent
If it is currently waiting in a queue, unfreeze that. Remove old interfaces does_batch and get_or_create_future.
fixes #5668