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

Disable visualizations for subexpressions #11949

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ final class JobExecutionEngine(
assertInJvm(timeSinceRequestedToCancel > 0)
val timeToCancel =
forceInterruptTimeout - timeSinceRequestedToCancel
assertInJvm(timeToCancel > 0)
logger.log(
Level.FINEST,
"About to wait {}ms to cancel job {}",
Expand All @@ -107,7 +108,8 @@ final class JobExecutionEngine(
runningJob.future.get(timeToCancel, TimeUnit.MILLISECONDS)
logger.log(
Level.FINEST,
"Job {} finished within the allocated soft-cancel time"
"Job {} finished within the allocated soft-cancel time",
runningJob.id
)
} catch {
case _: TimeoutException =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ class EnsureCompiledJob(
)
invalidatedVisualizations.foreach { visualization =>
UpsertVisualizationJob.upsertVisualization(visualization)
// Cache invalidation disabled because of #11882
// ctx.state.executionHooks.add(InvalidateCaches(visualization.expressionId))
Copy link
Contributor

Choose a reason for hiding this comment

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

yolo 🤠

}
if (invalidatedVisualizations.nonEmpty) {
ctx.executionService.getLogger.log(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ object ProgramExecutionSupport {

val onComputedValueCallback: Consumer[ExpressionValue] = { value =>
if (callStack.isEmpty) {
logger.log(Level.FINEST, s"ON_COMPUTED ${value.getExpressionId}")

if (VisualizationResult.isInterruptedException(value.getValue)) {
logger.log(Level.FINEST, s"ON_INTERRUPTED ${value.getExpressionId}")
value.getValue match {
case e: AbstractTruffleException =>
sendInterruptedExpressionUpdate(
Expand All @@ -110,6 +110,7 @@ object ProgramExecutionSupport {
case _ =>
}
}
logger.log(Level.FINEST, s"ON_COMPUTED ${value.getExpressionId}")
sendExpressionUpdate(contextId, executionFrame.syncState, value)
sendVisualizationUpdates(
contextId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ class UpsertVisualizationJob(
)
None
case None =>
// Caching disabled due to #11882
// ctx.state.executionHooks.add(InvalidateCaches(expressionId))
Some(Executable(config.executionContextId, stack))
}
}
Expand Down Expand Up @@ -160,7 +162,7 @@ class UpsertVisualizationJob(
object UpsertVisualizationJob {

/** Invalidate caches for a particular expression id. */
sealed private case class InvalidateCaches(
sealed case class InvalidateCaches(
expressionId: Api.ExpressionId
)(implicit ctx: RuntimeContext)
extends Runnable {
Expand Down Expand Up @@ -511,7 +513,6 @@ object UpsertVisualizationJob {
arguments
)
setCacheWeights(visualization)
ctx.state.executionHooks.add(InvalidateCaches(expressionId))
ctx.contextManager.upsertVisualization(
visualizationConfig.executionContextId,
visualization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4419,7 +4419,8 @@ class RuntimeVisualizationsTest extends AnyFlatSpec with Matchers {
new String(data1, StandardCharsets.UTF_8) shouldEqual "C"
}

it should "emit visualization update for the target of a method call (subexpression) with IdMap" in withContext() {
// Attaching visualizations to subexpressions is currently disabled, see #11882
ignore should "emit visualization update for the target of a method call (subexpression) with IdMap" in withContext() {
context =>
val contextId = UUID.randomUUID()
val requestId = UUID.randomUUID()
Expand Down
Loading