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

Replace all occurrences of "nil" in IDatabase(Async) xmldoc with less ambiguous alternatives #2702

Merged
merged 1 commit into from
May 7, 2024

Commits on Apr 22, 2024

  1. Replace all occurrences of "nil" in IDatabase(Async) xmldoc with le…

    …ss ambiguous alternatives
    
    Closes StackExchange#2697.
    
    All of the replacements were tested to be correct via simple programs in
    combination with a local redis instance.
    
    Notably, there is one worrying nit; in testing it turns out that
    the `IDatabase.List{Left,Right}Pop(RedisKey, long, CommandFlags)`
    overload _can_ actually return null, contrary to its nullability
    annotations. This occurs on missing key; in that case redis replies
    
    	Nil reply: if the key does not exist.
    
    as per https://redis.io/docs/latest/commands/lpop/, which then at
    
    	https://github.com/StackExchange/StackExchange.Redis/blob/cb8b20df0e2975717bde97ce95ac20e8e8353572/src/StackExchange.Redis/ResultProcessor.cs#L1546-L1547
    
    and later at
    
    	https://github.com/StackExchange/StackExchange.Redis/blob/cb8b20df0e2975717bde97ce95ac20e8e8353572/src/StackExchange.Redis/ExtensionMethods.cs#L339-L341
    
    turns into a `null`.
    
    I briefly attempted to rectify this, but the `RedisValueArrayProcessor`
    poses a problem here, as changing it to derive
    `ResultProcessor<RedisValue[]?>` causes the solution to light up in red,
    and I'd rather not mess with that as a first contribution.
    bdach committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    f4647e0 View commit details
    Browse the repository at this point in the history