Skip to content

Conversation

@AlphaGremlin
Copy link
Contributor

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.

Added new condition types
Added tests for stream length
Copy link
Collaborator

@mgravell mgravell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me; any chance you can add a pending entry in the release notes section (following the existing style)?

@AlphaGremlin
Copy link
Contributor Author

Done

Copy link
Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the Windows server build because it doesn't support streams - can we please add the skip condition here? See https://github.com/StackExchange/StackExchange.Redis/blob/main/tests/StackExchange.Redis.Tests/Streams.cs#L38 for the example#1813
Should be good after that!

Stream Length Condition test will be skipped if Streams are unavailable on the server
@AlphaGremlin
Copy link
Contributor Author

I actually encountered that problem when testing, though I solved it by installing Redis 6.2 via WSL2. Skipping works too.
Annoying that the Windows port isn't maintained anymore, WSL2 isn't exactly memory efficient. I need that RAM for when Visual Studio starts hogging it all!

@mgravell
Copy link
Collaborator

@NickCraver we could consider using the Memurai Developer Edition on our Windows build servers? it is an msi install, and the main feature limitation is that the free version needs to be restarted every 10 days; if our CI build lasts 10 days, we have bigger problems!

Copy link
Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@NickCraver NickCraver merged commit c0153ce into StackExchange:main Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants