plotly / plotly/dash

request queue leftovers

Open
#1,008 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

I'm not sure if this has any external effects (other than making our own testing harder) but there seem to be some cases where the requestQueue in the renderer redux state gets some stragglers. Noted by @byronz in #1001 when trying to wait for all callbacks to have completed prior to taking a snapshot, there are occasionally some requests with controllerId: null left over after everything has, in fact, completed.

These appear to be coming from this block:

https://github.com/plotly/dash/blob/046c438928c17e0f7faf5343f5f4e6d98d0c9efd/dash-renderer/src/actions/index.js#L926-L952

Apparently there are some implications 😏
My guess is that, because dispatch is not synchronous, updateOutput doesn't yet have the request present in order to clear it, so when it gets added later it just sticks around forever. I don't understand why we need this dummy request in the first place... to be investigated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in dash-renderer/src/actions/index.js at lines 926-952 and trace how requestQueue entries are added and cleared around updateOutput. Reproduce the snapshot-wait scenario described in #1001, then verify that completed callbacks leave no requestQueue entries with controllerId: null.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, redux
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.