Page MenuHomePhabricator

[Tunnelbroker] close RabbitMQ queue when client disconnects
ClosedPublic

Authored by kamil on Sep 28 2023, 7:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 25, 12:15 PM
Unknown Object (File)
Sun, Aug 25, 12:15 PM
Unknown Object (File)
Sun, Aug 25, 12:15 PM
Unknown Object (File)
Sun, Aug 25, 12:09 PM
Unknown Object (File)
Sat, Aug 24, 3:39 PM
Unknown Object (File)
Jul 18 2024, 8:17 AM
Unknown Object (File)
Jul 16 2024, 9:41 PM
Unknown Object (File)
Jul 2 2024, 11:30 PM
Subscribers

Details

Summary

This might cause issues and was causing error in past:

  1. We run persistence test
  2. Queue is created, but never closed
  3. We run tests again, messages are in database, but are also put into RabbitMQ
  4. Consumer receives messages, and try to send but socket is closed at this time
  5. It generates error in Tunnelbroker logs

Depends on D9316

Test Plan
  1. Without this changes run:

cd services/commtest && cargo test --test tunnelbroker_persist_tests  -- --nocapture

  1. Wait for the test to finish
  2. Go to RabbitMQ console and it shows queues:

Screenshot 2023-09-28 at 15.28.20.png (236×1 px, 23 KB)

  1. Restart RabbitMQ
  2. Do steps 1, 2, 3 and the console should show 0 queues:

Screenshot 2023-09-28 at 15.40.04.png (248×1 px, 25 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable