diff --git a/server/src/main/java/io/deephaven/server/session/SessionState.java b/server/src/main/java/io/deephaven/server/session/SessionState.java index 2ba3045be61..56b98bbc751 100644 --- a/server/src/main/java/io/deephaven/server/session/SessionState.java +++ b/server/src/main/java/io/deephaven/server/session/SessionState.java @@ -682,7 +682,11 @@ private synchronized void setWork( this.errorHandler = errorHandler; this.successHandler = successHandler; - setState(ExportNotification.State.PENDING); + if (state != ExportNotification.State.PUBLISHING) { + setState(ExportNotification.State.PENDING); + } else if (dependentCount > 0) { + throw new IllegalStateException("published exports cannot have dependencies"); + } if (dependentCount <= 0) { dependentCount = 0; scheduleExport(); @@ -920,7 +924,7 @@ private void onResolveOne(@Nullable final ExportObject parent) { */ private void scheduleExport() { synchronized (this) { - if (state != ExportNotification.State.PENDING) { + if (state != ExportNotification.State.PENDING && state != ExportNotification.State.PUBLISHING) { return; } setState(ExportNotification.State.QUEUED);