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

Error when JS API subscribes to large tables #3862

Closed
niloc132 opened this issue May 23, 2023 · 0 comments · Fixed by #3866
Closed

Error when JS API subscribes to large tables #3862

niloc132 opened this issue May 23, 2023 · 0 comments · Fixed by #3866
Assignees
Labels
barrage bug Something isn't working jsapi plotting
Milestone

Comments

@niloc132
Copy link
Member

The Deephaven JS API expects at this time (see #188 to fix this) that subscriptions will have snapshots sent in one message, and deltas in at most two messages (one for added rows and metadata, one for modified rows).

However, for snapshots with more than 65536 rows, the server seems to split the initial snapshot into more than one FlightData payload, which causes an error in the JS API when it processes the second message:

java.lang.AssertionError
    createError http://localhost:10000/jsapi/dh-core.js:1213
    initializeBackingError http://localhost:10000/jsapi/dh-core.js:1233
    Throwable http://localhost:10000/jsapi/dh-core.js:1171
    Error_0 http://localhost:10000/jsapi/dh-core.js:35713
    AssertionError http://localhost:10000/jsapi/dh-core.js:35723
    $appendAndMaybeFlush http://localhost:10000/jsapi/dh-core.js:14404
    $apply_2 http://localhost:10000/jsapi/dh-core.js:14445
    apply_40 http://localhost:10000/jsapi/dh-core.js:14484
    lambda http://localhost:10000/jsapi/dh-core.js:173
    doExchange http://localhost:10000/jsapi/dh-internal.js:1

To reproduce this, create a table with more than 65536, and try to get a full table subscription on it, such as for a scatter plot (at this time, scatter plots cannot be downsampled):

from deephaven import time, emtpy_table
t = empty_table(66000).update(["X=(DateTime)time.millis_to_datetime(i*100000)", "Y=Math.sin(i)"])
from deephaven.plot import Figure, PlotStyle
p = Figure().plot_xy(t=t, x='X', y='Y', series_name="scatter").axes(plot_style=PlotStyle.SCATTER).show()

Next, click the downsample icon, next to the warning ! that will appear on the chart's header, to confirm that downsampling should be disabled.

Expected: data appears.

Actual: browser console shows an error message, no data appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
barrage bug Something isn't working jsapi plotting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants