-
Notifications
You must be signed in to change notification settings - Fork 80
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
Make OperationInitializer non-static #4919
Merged
Merged
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
d3bb544
Cherry-pick specific files from existing branch
niloc132 60c53d0
Builds, intermittently passes tests
niloc132 3dfdd5e
branch-specific DI changes
niloc132 d10df3c
Capture operation initializer for new ugp threads
niloc132 0e3e493
Capture oitp in more places
niloc132 7ed447c
Replace oi on initialization threads
niloc132 cd7da03
Capture missing oi cases
niloc132 9a32bb2
Fix python test/sphinx setup
niloc132 0fabbd5
Force singleton oitp for tests
niloc132 23aed64
spotless
niloc132 fbc3400
restore threadlocal, since some exec contexts get replaced...
niloc132 94592ff
More test exec context cleanup
niloc132 54f55aa
Capture another missing oitp
niloc132 a1d00f4
Rework singletons of ugp/oipt for tests
niloc132 7bc91f1
correctly capture oitp for tests
niloc132 6ee4c84
Merge branch 'main' into 4040-oitp
niloc132 6581536
Review feedback
niloc132 3a4a883
Spotless, revert more test mistakes
niloc132 ee4c741
temp change to see if it works, find what tests to debug locally
niloc132 c2eb519
in-progress changes from review
niloc132 8c0e582
Merge branch 'main' into 4040-oitp
niloc132 4787a68
Finish review cleanup
niloc132 8641dd9
clearer naming and a comment
niloc132 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 10 additions & 44 deletions
54
Util/src/main/java/io/deephaven/util/thread/ThreadInitializationFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
engine/context/src/main/java/io/deephaven/engine/context/PoisonedOperationInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package io.deephaven.engine.context; | ||
|
||
import io.deephaven.engine.updategraph.OperationInitializer; | ||
import io.deephaven.util.ExecutionContextRegistrationException; | ||
|
||
import java.util.concurrent.Future; | ||
|
||
public class PoisonedOperationInitializer implements OperationInitializer { | ||
niloc132 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
public static final PoisonedOperationInitializer INSTANCE = new PoisonedOperationInitializer(); | ||
|
||
private <T> T fail() { | ||
throw ExecutionContextRegistrationException.onFailedComponentAccess("OperationInitializer"); | ||
} | ||
|
||
@Override | ||
public boolean canParallelize() { | ||
return fail(); | ||
} | ||
|
||
@Override | ||
public Future<?> submit(Runnable runnable) { | ||
return fail(); | ||
} | ||
|
||
@Override | ||
public int parallelismFactor() { | ||
return fail(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note to other reviewers:
I think this is a reasonable thing to add to the execution context, and that it's the right interface to add. I'd welcome consensus-building here.