Skip to content

Commit

Permalink
Select/Update: Do not Override User Supplied Execution Context for Se…
Browse files Browse the repository at this point in the history
…lectColumnLayer Processing (#4171)

Co-authored-by: Ryan Caudy <ryan@deephaven.io>
  • Loading branch information
2 people authored and stanbrub committed Jul 12, 2023
1 parent 4579c24 commit 5c1a5a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1468,11 +1468,7 @@ this, mode, columns, rowSet, getModifiedColumnSetForUpdates(), publishTheseSourc

final QueryTable resultTable;
final LivenessScope liveResultCapture = isRefreshing() ? new LivenessScope() : null;
try (final SafeCloseable ignored1 = liveResultCapture != null ? liveResultCapture::release : null;
final SafeCloseable ignored2 =
ExecutionContext.getDefaultContext().withUpdateGraph(getUpdateGraph()).open()) {
// we open the default context here to ensure that the update processing happens in the default
// context whether it is processed in parallel or not
try (final SafeCloseable ignored1 = liveResultCapture != null ? liveResultCapture::release : null) {
try (final RowSet emptyRowSet = RowSetFactory.empty();
final SelectAndViewAnalyzer.UpdateHelper updateHelper =
new SelectAndViewAnalyzer.UpdateHelper(emptyRowSet, fakeUpdate)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ final public class SelectColumnLayer extends SelectOrViewColumnLayer {
if (userSuppliedContext != null) {
this.executionContext = userSuppliedContext;
} else {
// the job scheduler requires the update graph
this.executionContext = ExecutionContext.newBuilder().setUpdateGraph(updateGraph).build();
// The job scheduler may require the auth context and update graph
this.executionContext = ExecutionContext.newBuilder().markSystemic().setUpdateGraph(updateGraph).build();
}

dependencyBitSet = new BitSet();
Expand Down

0 comments on commit 5c1a5a7

Please sign in to comment.