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

[Conduits] PATCH conduit does not properly "delete" shards #914

Open
Marenthyu opened this issue Feb 12, 2024 · 1 comment
Open

[Conduits] PATCH conduit does not properly "delete" shards #914

Marenthyu opened this issue Feb 12, 2024 · 1 comment
Labels
product: eventsub EventSub (Webhooks and WebSockets)

Comments

@Marenthyu
Copy link
Member

Brief description
Under certain circumstances, Conduits do not seem to "scale down" as described in the documentation, keeping shards above the maximum shard count "alive" instead.

How to reproduce

  1. Create a Conduit with 2 Shards
  2. Connect 2 WebSocket Transports to the Shards
  3. Disconnect WebSocket with Shard ID 0 (unsure at the time of writing if required)
  4. Scale down Conduit to 1 Shard
  5. Observe unchanged Conduit Status

Expected behavior
Shard with ID 1 should have been disabled/deleted and either a "status" of "deleted", "scaled_down" or similar should be set or not be present in the list of shards anymore.

Additional context or questions
Refer to Discussion on Discord in #eventsub-help

@Marenthyu Marenthyu added the product: eventsub EventSub (Webhooks and WebSockets) label Feb 12, 2024
@BarryCarlyon
Copy link
Contributor

To add a smidge of clarity on this one and a repo case:

  1. Create a conduit
  2. Subscribe some stuff to the conduit (chat probably works best as "noisy")
  3. Give the conduit two shards
  4. Assign those shards
  5. Wait for data and confirm both shards getting data
  6. Scale the conduit down to 1 shard
  7. All data is moved to the first shard, so the second shard is "effectivly disabled"
  8. Shard 2 still shows in the Get Conduit Shards API but is still "enabled" however is not being sent data (which is good, no "leaks" per sae)
  9. In this case shard 2 is a websocket, I kill the websocket and the shard becomes websocket_disconnected in the shards response

So, in summary, when you scale down using "reduce shard count"

  • The "extra" shards stop receiving data.
  • The "extra" shards still appear in Get Conduit Shards
  • The "extra" shards will still "change status" if the transport assigned changes state (which conceptually will be never for a webhook, but more likely on a websocket)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: eventsub EventSub (Webhooks and WebSockets)
Projects
None yet
Development

No branches or pull requests

2 participants