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

expose IAsyncEnumerable on ChannelMessageQueue #2402

Merged
merged 3 commits into from
Mar 15, 2023
Merged

expose IAsyncEnumerable on ChannelMessageQueue #2402

merged 3 commits into from
Mar 15, 2023

Conversation

mgravell
Copy link
Collaborator

@mgravell mgravell commented Mar 15, 2023

fix #2400

note in particular that we create the queue with multi-reader mode, so there are no unusual concurrency concerns here

@mgravell mgravell requested a review from NickCraver March 15, 2023 12:13
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.

Changes look good, just needs a quick API doc relocate!

@mgravell mgravell merged commit 9698aaa into main Mar 15, 2023
@mgravell mgravell deleted the issue2400 branch March 15, 2023 12:40
mgravell added a commit that referenced this pull request Aug 10, 2023
…-centric

- introduce `Resp2Type` and `Resp3Type` shims (`Resp2Type` has reduced types)
- mark existing `Type` as `[Obsolete]`, and proxy to `Resp2Type` for compat
- deal with null handling differences
- deal with `Boolean`, which works very differently (`t`/`f` instead of `1`/`0`)

remove RedisResult.Type from Shipped.txt

- handle RESP3 types
- handle [+|-]{inf|nan}
- avoid alloc when parsing doubles

made the RedisResult constructor non-public (fix accidental API)

remove RawResult.Type; fix broken loop

format

incorrect attribute check

- nomenclature: MultiBulk => Array
- efficiency: use bit-packing to RESP2 type conversion is a bit mask

fix RawResult.HasValue

fix null array return (EmptyMultiBulk is no longer helpful)

add a ToString to Replica (other bits were local test setup issues)

simplify switch in TryParseDouble

- protocol configuration parsing
- avoid inbuilt equality/comparison operations on Version
- rules for when to try resp3

configuration documentation

words

fix ConfigurationOptions.Clone

actually connect via RESP3

demand redis6 in the RESP3 connect test

remove unnecessary directives

Lua results

more tests and tweaks to fix tests

simplify handshake

fallback connect

move SETNAME back into HELLO message; add lots of documentation about *why*

DEBUG PROTOCOL tests; some failures to look at

fix protocol tests

add missing "hide me" attribs

add docs and release notes

tyop

redundant

re-enable to get server-maintenance notifications

- ConnectWithBrokenHello is inconclusive if not a v6 server
- allow non-RESP3 tests on non-v6 servers

"DEBUG PROTOCOL" tests are inconclusive on non-v6

fix TryConnect (CLIENT ID) not always available

save all

counting is hard

expose IAsyncEnumerable on ChannelMessageQueue (#2402)

* expose IAsyncEnumerable on ChannelMessageQueue
fix #2400

* PR number

* move ChannelMessageQueue.GetAsyncEnumerator to shipped

LUA conversions

version Lua RESP conversions

true/false handling depends on setresp(3)

revert "if" split in ResultProcessor

use enum for RedisProtocol

reinstate parameterless RedisResult .ctor

fix resp 2/3 inversion snafu from enumification

fix resp dependent connection reuse issue

add failing Execute test re RESP2 vs RESP3 delta

ValuePairInterleavedProcessorBase should auto-handle responses that have become jagged in RESP3

pattern match is easier to read here

- move IsResp3; that is a PhysicalConnection thing, not a ServerEndPoint thing
- allow RawResult to know whether it is RESP3; involved moving some flags (which removes a bit hack we were using, so: yay)
- make the interleave un-jaggedify only apply on RESP3

add more RESP3 API change tests

compensate for XREAD having a different shape in RESP3

disable implicit RESP3 based on target server version
mgravell added a commit that referenced this pull request Aug 10, 2023
…-centric

- introduce `Resp2Type` and `Resp3Type` shims (`Resp2Type` has reduced types)
- mark existing `Type` as `[Obsolete]`, and proxy to `Resp2Type` for compat
- deal with null handling differences
- deal with `Boolean`, which works very differently (`t`/`f` instead of `1`/`0`)

remove RedisResult.Type from Shipped.txt

- handle RESP3 types
- handle [+|-]{inf|nan}
- avoid alloc when parsing doubles

made the RedisResult constructor non-public (fix accidental API)

remove RawResult.Type; fix broken loop

format

incorrect attribute check

- nomenclature: MultiBulk => Array
- efficiency: use bit-packing to RESP2 type conversion is a bit mask

fix RawResult.HasValue

fix null array return (EmptyMultiBulk is no longer helpful)

add a ToString to Replica (other bits were local test setup issues)

simplify switch in TryParseDouble

- protocol configuration parsing
- avoid inbuilt equality/comparison operations on Version
- rules for when to try resp3

configuration documentation

words

fix ConfigurationOptions.Clone

actually connect via RESP3

demand redis6 in the RESP3 connect test

remove unnecessary directives

Lua results

more tests and tweaks to fix tests

simplify handshake

fallback connect

move SETNAME back into HELLO message; add lots of documentation about *why*

DEBUG PROTOCOL tests; some failures to look at

fix protocol tests

add missing "hide me" attribs

add docs and release notes

tyop

redundant

re-enable to get server-maintenance notifications

- ConnectWithBrokenHello is inconclusive if not a v6 server
- allow non-RESP3 tests on non-v6 servers

"DEBUG PROTOCOL" tests are inconclusive on non-v6

fix TryConnect (CLIENT ID) not always available

save all

counting is hard

expose IAsyncEnumerable on ChannelMessageQueue (#2402)

* expose IAsyncEnumerable on ChannelMessageQueue
fix #2400

* PR number

* move ChannelMessageQueue.GetAsyncEnumerator to shipped

LUA conversions

version Lua RESP conversions

true/false handling depends on setresp(3)

revert "if" split in ResultProcessor

use enum for RedisProtocol

reinstate parameterless RedisResult .ctor

fix resp 2/3 inversion snafu from enumification

fix resp dependent connection reuse issue

add failing Execute test re RESP2 vs RESP3 delta

ValuePairInterleavedProcessorBase should auto-handle responses that have become jagged in RESP3

pattern match is easier to read here

- move IsResp3; that is a PhysicalConnection thing, not a ServerEndPoint thing
- allow RawResult to know whether it is RESP3; involved moving some flags (which removes a bit hack we were using, so: yay)
- make the interleave un-jaggedify only apply on RESP3

add more RESP3 API change tests

compensate for XREAD having a different shape in RESP3

disable implicit RESP3 based on target server version

# Conflicts:
#	docs/Configuration.md
#	docs/ReleaseNotes.md
#	src/StackExchange.Redis/ConfigurationOptions.cs
#	src/StackExchange.Redis/ConnectionMultiplexer.cs
#	src/StackExchange.Redis/Interfaces/IConnectionMultiplexer.cs
#	src/StackExchange.Redis/ServerEndPoint.cs
#	tests/StackExchange.Redis.Tests/PubSubTests.cs
#	tests/StackExchange.Redis.Tests/TestBase.cs
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.

Expose ChannelMessageQueue as IAsyncEnumerable
2 participants