class documentation

class _IsolationBudget:

View In Hierarchy

The requests left to isolate the rejected entities of one rejected batch.

Splitting is allowed only while the isolation could still finish one entity at a time within limit, so spent + unresolved <= limit holds throughout, and the isolation never makes more than limit requests.

Method can_split Whether splitting an unresolved group (two requests) keeps room to finish one at a time.
Instance Variable limit The most requests the isolation may make.
Instance Variable rejected The entities found to be rejected on their own.
Instance Variable spent The requests made so far.
Instance Variable unresolved The entities in rejected groups not yet isolated, which would cost one request each to finish one at a time.
def can_split(self) -> bool:

Whether splitting an unresolved group (two requests) keeps room to finish one at a time.

If both halves are rejected, nothing is resolved, so the cost of finishing one at a time then exceeds the cost now by two requests.

limit: int =

The most requests the isolation may make.

rejected: int =

The entities found to be rejected on their own.

spent: int =

The requests made so far.

unresolved: int =

The entities in rejected groups not yet isolated, which would cost one request each to finish one at a time.