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

[pull] main from rabbitmq:main #1

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
e4e05a0
chore: bump regular System.Text.RegularExpressions due to a known CVE…
aygalinc Dec 6, 2024
8109c96
Simplify preprocessor directives
danielmarbach Dec 8, 2024
a8dc8ce
Merge pull request #1741 from danielmarbach/condition
lukebakken Dec 8, 2024
cf830aa
Minor change in integration tests
lukebakken Dec 9, 2024
103c39e
Merge pull request #1742 from rabbitmq/lukebakken/minor-naming-change
lukebakken Dec 10, 2024
d7c0503
Toxiproxy manager change
lukebakken Dec 11, 2024
5b33811
Merge pull request #1744 from rabbitmq/lukebakken/toxiproxy-tweak
lukebakken Dec 12, 2024
b5d6459
Set TestTfmsInParallel fals for Integration tests
lukebakken Dec 12, 2024
354d4bd
Merge pull request #1745 from rabbitmq/lukebakken/toxiproxy-aha
lukebakken Dec 12, 2024
b5ebf85
Update to latest OTel conventions
iinuwa Oct 31, 2024
0496126
Merge pull request #1717 from iinuwa/feat/update-otel-conventions
lukebakken Dec 13, 2024
2778d48
* Update NuGet packages
lukebakken Dec 13, 2024
4dca7a0
* Fix package version conflict warnings.
lukebakken Dec 13, 2024
5b64e27
Merge pull request #1748 from rabbitmq/lukebakken/nuget-package-updates
lukebakken Dec 14, 2024
ba8c2e0
Update copyright year to 2025
lukebakken Jan 3, 2025
0e37de9
Merge pull request #1755 from rabbitmq/lukebakken/copyright-year
lukebakken Jan 3, 2025
5b1c9cc
Add 0e37de95526785901f714ac91e52b4254d045221
lukebakken Jan 3, 2025
1b74f30
Ensure broker-originated channel closure completes
lukebakken Jan 7, 2025
a464d61
Merge pull request #1764 from rabbitmq/rabbitmq-dotnet-client-1749-fi…
lukebakken Jan 9, 2025
4bb45e2
Remove whitespaces from csproj files
sungam3r Jan 13, 2025
fc8c626
Merge pull request #1768 from sungam3r/whitespaces
lukebakken Jan 13, 2025
aa5b3d7
Misc items
lukebakken Jan 9, 2025
662ace3
Merge pull request #1766 from rabbitmq/lukebakken/misc
lukebakken Jan 13, 2025
c1984ea
Fix typos
sungam3r Jan 15, 2025
db37681
Merge pull request #1770 from sungam3r/typo
lukebakken Jan 15, 2025
cc16b10
Fix cancellation of RPC methods
lukebakken Dec 26, 2024
bcba9e4
Merge pull request #1753 from rabbitmq/rabbitmq-dotnet-client-1750
lukebakken Jan 16, 2025
75822ae
7.1.0-alpha.0 CHANGELOG
lukebakken Jan 16, 2025
9c6fda8
Improve error when disabling heartbeat
lukebakken Jan 23, 2025
276c9a6
Allow setting TimeSpan.Zero as a heartbeat timeout value
lukebakken Jan 24, 2025
2cb90b5
Add assertion that actual heartbeat timeout has been updated with the…
lukebakken Jan 24, 2025
21fb198
Merge pull request #1773 from rabbitmq/rabbitmq-dotnet-client-1756
lukebakken Jan 30, 2025
a3c4ec5
Create cancellation token from `timeout`
lukebakken Jan 24, 2025
fa9bc43
* Create `CancellationToken` in internal `CloseAsync` method. Thanks …
lukebakken Jan 30, 2025
51d1eeb
Merge pull request #1775 from rabbitmq/rabbitmq-dotnet-client-1759
michaelklishin Feb 4, 2025
52e25da
Track down `ObjectDisposedExceptions`
lukebakken Jan 23, 2025
5f4621f
Merge pull request #1772 from rabbitmq/rabbitmq-dotnet-client-1760
lukebakken Feb 11, 2025
e33544d
Fix #1777
lukebakken Feb 12, 2025
2718d46
Fix very rare deadlock
lukebakken Jan 22, 2025
17b216d
Merge pull request #1771 from rabbitmq/rabbitmq-dotnet-client-1751
lukebakken Feb 12, 2025
0f2f247
Merge pull request #1781 from rabbitmq/rabbitmq-dotnet-client-1777
lukebakken Feb 12, 2025
0a4cec0
7.1.0-alpha.1 CHANGELOG
lukebakken Feb 12, 2025
2c0b7ee
Fix rare deadlock, second try
lukebakken Feb 13, 2025
ef73206
Merge pull request #1782 from rabbitmq/rabbitmq-dotnet-client-1751-2
lukebakken Feb 19, 2025
a8dcbc9
v7.1.0 CHANGELOG
lukebakken Feb 19, 2025
527e87f
Fix bug in `IntervalList`
lukebakken Feb 20, 2025
eb64b79
Merge pull request #1785 from rabbitmq/rabbitmq-dotnet-client-1751-3
lukebakken Feb 21, 2025
4b866e1
Port `IntAllocator` from `rabbitmq-java-client`
lukebakken Feb 21, 2025
00e227a
Demonstrate handling of `Channel.Close`
lukebakken Feb 21, 2025
1d5f574
Merge pull request #1791 from rabbitmq/rabbitmq-server-13387
lukebakken Feb 24, 2025
13353a2
Merge pull request #1790 from rabbitmq/rabbitmq-dotnet-client-1786
lukebakken Feb 24, 2025
068bc00
Related to discussion #1793
lukebakken Feb 24, 2025
3862722
Merge pull request #1794 from rabbitmq/rabbitmq-dotnet-client-1793
lukebakken Feb 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix cancellation of RPC methods
Fixes rabbitmq#1750

* Start by adding a test that demonstrates the error. Give a 5ms cancellation to `BasicConsumeAsync`, with a much longer delay via a hacked RabbitMQ. If running in debug mode, you will see the same `task canceled` exception, but it does not propagate to the test itself.
* Set cancellation correctly for TaskCompletionSource in AsyncRpcContinuation
* Handle continuation cancellation and timeouts correctly
* Refactor repeated code
* Add wait on `RegisteredAsync` to see how the changes in rabbitmq#1750 affect the order of operations.
* Check to ensure no connection shutdown in `TestBasicConsumeCancellation_GH1750`
* @danielmarbach noticed an improvement. Do not elide `await` here.
* Extend GHA timeout for Windows builds, yuck (see actions/runner-images#7320)
lukebakken committed Jan 16, 2025
commit cc16b10459d6a32c832d7e9ea719367be8bf93a7
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ jobs:
id: install-start-rabbitmq
run: ${{ github.workspace }}\.ci\windows\gha-setup.ps1
- name: Integration Tests
timeout-minutes: 25
timeout-minutes: 45
run: |
Start-Job -Verbose -ScriptBlock { & "${{ github.workspace }}\.ci\windows\toxiproxy\toxiproxy-server.exe" | Out-File -LiteralPath $env:APPDATA\RabbitMQ\log\toxiproxy-log.txt }; `
dotnet test `
@@ -113,7 +113,7 @@ jobs:
id: install-start-rabbitmq
run: ${{ github.workspace }}\.ci\windows\gha-setup.ps1
- name: Sequential Integration Tests
timeout-minutes: 25
timeout-minutes: 45
run: dotnet test `
--environment 'RABBITMQ_LONG_RUNNING_TESTS=true' `
--environment "RABBITMQ_RABBITMQCTL_PATH=${{ steps.install-start-rabbitmq.outputs.path }}" `
Original file line number Diff line number Diff line change
@@ -83,61 +83,65 @@ internal ConsumerDispatcherChannelBase(Impl.Channel channel, ushort concurrency)

public ushort Concurrency => _concurrency;

public ValueTask HandleBasicConsumeOkAsync(IAsyncBasicConsumer consumer, string consumerTag, CancellationToken cancellationToken)
public async ValueTask HandleBasicConsumeOkAsync(IAsyncBasicConsumer consumer, string consumerTag, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();

if (false == _disposed && false == _quiesce)
{
AddConsumer(consumer, consumerTag);
WorkStruct work = WorkStruct.CreateConsumeOk(consumer, consumerTag);
return _writer.WriteAsync(work, cancellationToken);
}
else
{
return default;
try
{
AddConsumer(consumer, consumerTag);
WorkStruct work = WorkStruct.CreateConsumeOk(consumer, consumerTag);
await _writer.WriteAsync(work, cancellationToken)
.ConfigureAwait(false);
}
catch
{
_ = GetAndRemoveConsumer(consumerTag);
throw;
}
}
}

public ValueTask HandleBasicDeliverAsync(string consumerTag, ulong deliveryTag, bool redelivered,
public async ValueTask HandleBasicDeliverAsync(string consumerTag, ulong deliveryTag, bool redelivered,
string exchange, string routingKey, IReadOnlyBasicProperties basicProperties, RentedMemory body,
CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();

if (false == _disposed && false == _quiesce)
{
IAsyncBasicConsumer consumer = GetConsumerOrDefault(consumerTag);
var work = WorkStruct.CreateDeliver(consumer, consumerTag, deliveryTag, redelivered, exchange, routingKey, basicProperties, body);
return _writer.WriteAsync(work, cancellationToken);
}
else
{
return default;
await _writer.WriteAsync(work, cancellationToken)
.ConfigureAwait(false);
}
}

public ValueTask HandleBasicCancelOkAsync(string consumerTag, CancellationToken cancellationToken)
public async ValueTask HandleBasicCancelOkAsync(string consumerTag, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();

if (false == _disposed && false == _quiesce)
{
IAsyncBasicConsumer consumer = GetAndRemoveConsumer(consumerTag);
WorkStruct work = WorkStruct.CreateCancelOk(consumer, consumerTag);
return _writer.WriteAsync(work, cancellationToken);
}
else
{
return default;
await _writer.WriteAsync(work, cancellationToken)
.ConfigureAwait(false);
}
}

public ValueTask HandleBasicCancelAsync(string consumerTag, CancellationToken cancellationToken)
public async ValueTask HandleBasicCancelAsync(string consumerTag, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();

if (false == _disposed && false == _quiesce)
{
IAsyncBasicConsumer consumer = GetAndRemoveConsumer(consumerTag);
WorkStruct work = WorkStruct.CreateCancel(consumer, consumerTag);
return _writer.WriteAsync(work, cancellationToken);
}
else
{
return default;
await _writer.WriteAsync(work, cancellationToken)
.ConfigureAwait(false);
}
}

Loading