Replace all occurrences of "nil" in IDatabase(Async)
xmldoc with less ambiguous alternatives
#2702
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2697.
All of the replacements were empirically 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 which I talked about in the issue can actually return null, contrary to its nullability annotations. This occurs on missing key; in that case redis repliesas per https://redis.io/docs/latest/commands/lpop/, which then at
StackExchange.Redis/src/StackExchange.Redis/ResultProcessor.cs
Lines 1546 to 1547 in cb8b20d
and later at
StackExchange.Redis/src/StackExchange.Redis/ExtensionMethods.cs
Lines 339 to 341 in cb8b20d
turns into a
null
.I briefly attempted to rectify this, but the
RedisValueArrayProcessor
poses a problem here, as changing it to deriveResultProcessor<RedisValue[]?>
causes the solution to light up in red, and I'd rather not mess with that as a first contribution without at least prior discussion concerning direction there.