Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vtgate/buffer: Fix leakage of buffer pool slots due to canceled requests. #2599

Merged
merged 1 commit into from
Feb 26, 2017

Commits on Feb 26, 2017

  1. vtgate/buffer: Fix leakage of buffer pool slots due to canceled reque…

    …sts.
    
    Canceled requests, e.g. those with a deadline shorter than the failover duration, would not return their buffer pool slot. Eventually, all slots would have leaked and the buffer would start and stop buffering as usual but reject all requests immediately because it assumed there are other pending failovers which are holding the needed slots.
    
    Previously, the code path for canceled requests differed from the common method unblockAndWait() which would unblock a request and also release its buffer pool slot after the request finished its retry. This made this oversight possible. I've changed this now: canceled requests also use unblockAndWait() now.
    
    The code was also out of sync with the documentation for WaitForFailoverEnd(): The RetryDoneFunc() must not be returned when the function returns an error as well. However, for canceled requests both were returned.
    michael-berlin committed Feb 26, 2017
    Configuration menu
    Copy the full SHA
    ab84dc8 View commit details
    Browse the repository at this point in the history