Skip to content

Bug: extendData/prependData data loss from fast intervals #54

@bcliang

Description

@bcliang

Current behavior:
In the integration test suite (and within usage.py, the extendData and prependData callbacks are triggered on a >= 100ms periodic interval. All tests pass.

However, if the interval is reduced there can be situations where a new callback may be triggered while an existing callback is still being executed (large dataset, slow compute). In this situation, the latest previous changes are discarded and a new state is created with the new information. Other possible triggers: asynchronous data updates when using an asynchronous/websocket server framework (dash-devices, dash-django).

The end result is that data can be lost in the ExtendableGraph object (traces are miss some updates).

Expected behavior:
The component should properly extend (or prepend) all data (no skips). I think the "eventually-consistent" model is the right approach.

Proposed Solution
dcc.Graph implements an array for extend / prepend props, allowing the "final" callback to handle multiple callbacks within a single execution. There is an issue in dash-core-components suggesting that the implementation is flaky.

Additional investigation:

  • how should we handle simultaneous callback from prependData and extendData?
  • how should we handle simultaneous callback from figure.data and extendData ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions