Skip to content

Commit

Permalink
Account for SyncTableFilter weirdness, and allow failure notification…
Browse files Browse the repository at this point in the history
… after update on the same cycle
  • Loading branch information
rcaudy committed Dec 4, 2022
1 parent 76576b7 commit 91f5603
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -893,12 +893,10 @@ private void validateUpdateOverlaps(final TableUpdate update) {
*/
public final void notifyListenersOnError(final Throwable e, @Nullable final TableListener.Entry sourceEntry) {
Assert.eqFalse(isFailed, "isFailed");
final long currentStep = LogicalClock.DEFAULT.currentStep();
Assert.lt(lastNotificationStep, "lastNotificationStep", currentStep, "LogicalClock.DEFAULT.currentStep()");

isFailed = true;
maybeSignal();
lastNotificationStep = currentStep;
lastNotificationStep = LogicalClock.DEFAULT.currentStep();

final NotificationQueue notificationQueue = getNotificationQueue();
childListenerReferences.forEach((listenerRef, listener) -> notificationQueue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private void notifyInternal(@Nullable final Throwable upstreamError,
}

private void propagateProcessError(@NotNull final Exception updateException, final long currentStep) {
if (result.getLastNotificationStep() == currentStep) {
if (result != null && result.getLastNotificationStep() == currentStep) {
// If the result managed to send its notification, we should not send our own.
if (result.isFailed()) {
// That said, if the result is now failed, let's make sure we're out of the DAG.
Expand Down Expand Up @@ -141,11 +141,11 @@ private void propagateErrorInternal(@NotNull final Throwable error, @Nullable fi
}
}

private boolean systemicResult() {
protected boolean systemicResult() {
return SystemicObjectTracker.isSystemic(MergedListener.this.result);
}

private void propagateErrorDownstream(@NotNull final Throwable error, @Nullable final TableListener.Entry entry) {
protected void propagateErrorDownstream(@NotNull final Throwable error, @Nullable final TableListener.Entry entry) {
result.notifyListenersOnError(error, entry);
}

Expand Down

0 comments on commit 91f5603

Please sign in to comment.