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

fix: JS API viewports should throw only for basic data issues #6535

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

niloc132
Copy link
Member

@niloc132 niloc132 commented Jan 8, 2025

Network issues now fire requestfailed events to signal that the table was in a bad state.

Fixes DH-18331

Network issues now fire requestfailed events to signal that the table
was in a bad state.

Fixes DH-18331
@niloc132 niloc132 added this to the 0.38.0 milestone Jan 8, 2025
@niloc132 niloc132 requested review from abaranec and mofojed January 8, 2025 19:11
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested against Grizzly and verified the table now recovers correctly.

Comment on lines +253 to +255
if (firstRow < 0 || firstRow > lastRow) {
throw new IllegalArgumentException("Invalid viewport row range: " + firstRow + " to " + lastRow);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing you added this because it was in DHE?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct - trying to slightly better match semantics, especially since we removed the check in RangeSet that the ranges are ordered properly (as it was causing performance issues on subscriptions to large tables).

This is one of the few cases where we actually throw when calling setViewport in both APIs. When we get an api design for subscriptions that also handles preview and reverse viewports, we'll be more deliberate about how to handle these classes of errors...

@niloc132 niloc132 enabled auto-merge (squash) January 8, 2025 19:33
@niloc132 niloc132 merged commit fc40e1d into deephaven:main Jan 8, 2025
23 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants