Skip to content

Commit

Permalink
Open ExecutionContext
Browse files Browse the repository at this point in the history
  • Loading branch information
devinrsmith committed Dec 11, 2024
1 parent 919eb33 commit e1f1c0e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,8 @@ interface TicketHandlerReleasable extends TicketHandler {
}

private Table executeSqlQuery(String sql) {
final QueryScope queryScope = ExecutionContext.getContext().getQueryScope();
final ExecutionContext executionContext = ExecutionContext.getContext();
final QueryScope queryScope = executionContext.getQueryScope();
// We aren't managing the liveness of Tables that come verbatim (authorization un-transformed) from the query
// scope (we are ensuring that any transformed, or operation created, tables don't escape to a higher-layer's
// liveness scope). In the case where they either are already not live, or become not live by the time the
Expand Down Expand Up @@ -685,7 +686,11 @@ private Table executeSqlQuery(String sql) {
// io.deephaven.auth.ServiceAuthWiring checks.
// TODO(deephaven-core#6307): Declarative server-side table execution logic that preserves authorization
// logic
try (final SafeCloseable ignored1 = updateGraph == null ? null : updateGraph.sharedLock().lockCloseable()) {
try (
final SafeCloseable ignored0 =
updateGraph == null ? null : executionContext.withUpdateGraph(updateGraph).open();
final SafeCloseable ignored1 =
updateGraph == null ? null : updateGraph.sharedLock().lockCloseable()) {
final Table table = tableSpec.logic().create(tableCreator);
if (table.isRefreshing()) {
table.retainReference();
Expand Down

0 comments on commit e1f1c0e

Please sign in to comment.