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

feat: Simplify Barrage Viewport Table Updates #6347

Merged
merged 38 commits into from
Nov 18, 2024

Conversation

nbauernfeind
Copy link
Member

@nbauernfeind nbauernfeind commented Nov 8, 2024

Fixes #6039.
Fixes #6053.

The barrage viewport protocol has now changed:

  • viewports are never sent included rows; all added rows are included
  • added rows are position space from within the server-respected client requested viewport
  • removed rows are position space from within the server-respected client requested viewport
  • snapshots on viewports include removed rows to simplify client side processing
  • barrage update metadata now explicitly includes current table size; viewports no longer track the source table's full rowset

viewport clients must infer shifts:

  • removed rows are in pre-update space
  • added rows are in post-update space
  • the end-result viewport is retained rows + added rows (retained are the existing rows minus removed rows) where the adds are in the offsets specified by added rows

In this PR we'll bump the following dependencies:

  • flatbuffer from 1.12.0 to 24.3.25
  • arrow from 13.0.0 to 18.0.0
  • protobuf 3.25.3 to 3.25.4
  • barrage from 0.6.0 to 0.7.2 (noting that 0.7.x was released for this feature set)


prevKeyspaceViewportRows.clear();
prevKeyspaceViewportRows.insert(keyspaceViewportRows);
prevKeyspaceViewportRows.resetTo(barrageMessage.rowsIncluded);
Copy link
Member

Choose a reason for hiding this comment

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

I think getSubView needs to document that (1) it does not own the row sets passed in, and (2) when they can be mutated.
The keyspace viewports can be mutated as soon as the call returns.
The position space viewport must not be mutated until the message is sent.

Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

.

Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@niloc132 niloc132 left a comment

Choose a reason for hiding this comment

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

Doesnt look like we have a formal ticket for this?

#6053 would be a good one.

Also please add notes to commit message/description about barrage/arrow/flatbuffer vers bumps.

rcaudy
rcaudy previously approved these changes Nov 16, 2024
niloc132
niloc132 previously approved these changes Nov 18, 2024
Copy link
Member

@niloc132 niloc132 left a comment

Choose a reason for hiding this comment

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

Two remarks, neither blocking, so I approved.

In addition to the other remark, I'll follow up with bumping required java versions to the downstream modules of arrow 18, as it has a minimum of Java 11 now, and so do all of our libraries that depend on it, directly or indirectly.

@@ -545,6 +549,31 @@ public boolean includesAnyOf(Range range) {
return range.getFirst() <= target.getLast() && range.getLast() >= target.getFirst();
}

public long find(long key) {
Copy link
Member

Choose a reason for hiding this comment

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

i'll follow up this PR with unit tests

@nbauernfeind nbauernfeind merged commit d3b0ad4 into deephaven:main Nov 18, 2024
17 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2024
@deephaven-internal
Copy link
Contributor

Labels indicate documentation is required. Issues for documentation have been opened:

Community: deephaven/deephaven-docs-community#362

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants