Stream Length Transaction Conditions by AlphaGremlin · Pull Request #1807 · StackExchange/StackExchange.Redis (original) (raw)
Adding some new condition overloads for XLEN, useful for deleting empty streams in a safe method. It's a very simple change, one line to the length condition implementation plus the overloads.
Tests have been added and pass, though I don't have the infrastructure to run the failover/cluster/etc tests. I can include the .trx file if that's important.
I would have liked to add more conditions, like one that calls XPENDING to examine the number of pending messages, but that would need a new condition implementation with different messages and more complicated code to examine the results. Maybe I'll do it in another pull request, if I find the time.