vinyl: don't consume quota if wait queue isn't empty
vy_quota_use only checks if there's enough quota available for consumer to proceed, but that's not enough, because it may occur that there are fibers already waiting for the resource. Bypassing them may result in starvation, which manifests itself as "waited for vinyl memory quota for too long" warnings. To ensure fairness and avoid starvation, let's go to sleep if the wait queue is not empty.
Loading
Please register or sign in to comment