-
Notifications
You must be signed in to change notification settings - Fork 81
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
Enable Support for Multiple Update Graph Processors #3506
Conversation
I haven't reviewed this PR, but I have done a quick migration of |
eee5c0a
to
90a2730
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High level review. Suggested some refactoring, and a change to the policy that determines UGP for derived tables.
engine/updategraph/src/main/java/io/deephaven/engine/updategraph/UpdateContext.java
Outdated
Show resolved
Hide resolved
engine/updategraph/src/main/java/io/deephaven/engine/updategraph/UpdateContext.java
Outdated
Show resolved
Hide resolved
engine/updategraph/src/main/java/io/deephaven/engine/updategraph/UpdateContext.java
Outdated
Show resolved
Hide resolved
engine/updategraph/src/main/java/io/deephaven/engine/updategraph/UpdateContext.java
Outdated
Show resolved
Hide resolved
engine/updategraph/src/main/java/io/deephaven/engine/updategraph/UpdateContext.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/QueryTable.java
Outdated
Show resolved
Hide resolved
server/src/main/java/io/deephaven/server/table/ops/JoinTablesGrpcImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/io/deephaven/server/table/ops/GrpcTableOperation.java
Outdated
Show resolved
Hide resolved
We discussed in-person about maybe just having the idea of an |
@rcaudy Is this targeting June release now? |
23c89d8
to
7b5320c
Compare
ce90980
to
aeedeb9
Compare
…rTestBase and TestExecutionContext
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving. Please don't merge unless nightlies are green.
@@ -36,6 +37,10 @@ class ExecutionContext(JObjectWrapper, ContextDecorator): | |||
def j_object(self) -> jpy.JType: | |||
return self.j_exec_ctx | |||
|
|||
@property | |||
def update_graph(self) -> _JUpdateGraph: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two problems:
- The API is exposing Java objects to the user.
- The type hint is referring to a private variable.
@@ -537,6 +539,15 @@ def is_refreshing(self) -> bool: | |||
self._is_refreshing = self.j_table.isRefreshing() | |||
return self._is_refreshing | |||
|
|||
@property | |||
def update_graph(self) -> _JUpdateGraph: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two problems:
- The API is exposing Java objects to the user.
- The type hint is referring to a private variable.
@@ -2298,6 +2309,11 @@ def table(self) -> Table: | |||
self._table = Table(j_table=self.j_partitioned_table.table()) | |||
return self._table | |||
|
|||
@property | |||
def update_graph(self) -> _JUpdateGraph: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two problems:
- The API is exposing Java objects to the user.
- The type hint is referring to a private variable.
@@ -2554,6 +2570,11 @@ def is_refreshing(self) -> bool: | |||
"""Whether this proxy represents a refreshing partitioned table.""" | |||
return self.target.is_refreshing | |||
|
|||
@property | |||
def update_graph(self) -> _JUpdateGraph: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two problems:
- The API is exposing Java objects to the user.
- The type hint is referring to a private variable.
@@ -237,25 +238,29 @@ def modified_columns(self) -> List[str]: | |||
return list(cols) if cols else [] | |||
|
|||
|
|||
def _do_locked(f: Callable, lock_type="shared") -> None: | |||
"""Executes a function while holding the UpdateGraphProcessor (UGP) lock. Holding the UGP lock | |||
def _do_locked(ug: Union[_JUpdateGraph, Table], f: Callable, lock_type="shared") -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two problems:
- The API is exposing Java objects to the user.
- The type hint is referring to a private variable.
be released after the table operation finishes. Auto locking is turned on by default.""" | ||
|
||
|
||
def has_exclusive_lock(ug: Union[_JUpdateGraph, "Table", "PartitionedTable", "PartitionTableProxy"]) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two problems:
- The API is exposing Java objects to the user.
- The type hint is referring to a private variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many places in this file.
…s after failure 2. Add PeriodicUpdateGraph caching by name, and re-use when providing via Dagger 3. Add proper unit test for update graph conflicts 4. Fix bug in update graph provision for merge and partitioned table construction
…ion initializationf or sphinx
Labels indicate documentation is required. Issues for documentation have been opened: How-to: https://github.com/deephaven/deephaven.io/issues/2731 |
Here is some sample Groovy usage:
Observe that the table still ticks when the REPL is holding the exclusive DEFAULT PUG lock:
Note that as-is the UGP stops and does not propagate a stop-related error notification to source table listeners. We might want to do something to be clear that the tables are done. We cannot purely set reference count to zero as this does not propagate downstream. I did try out such a change, but it some tests that were not expecting liveness referents / artifacts to fail
manage
calls.Nightlies: https://github.com/nbauernfeind/deephaven-core/actions/runs/4789971295