Browse Source
Merge pull request #16037 from AndriiLandiak/fix/sync-not-stranded-on-fetcher-failure
Do not strand edge sync when an event fetcher fails
pull/16035/merge
Viacheslav Klimov
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
1 deletions
-
application/src/main/java/org/thingsboard/server/service/edge/rpc/session/EdgeGrpcSession.java
|
|
@ -366,7 +366,12 @@ public class EdgeGrpcSession implements EdgeSession { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void onFailure(Throwable t) { |
|
|
public void onFailure(Throwable t) { |
|
|
log.error("[{}][{}] Exception during sync process", getTenantId(), getEdgeId(), t); |
|
|
log.error("[{}][{}] Exception during sync process, skipping fetcher {} and continuing", |
|
|
|
|
|
getTenantId(), getEdgeId(), next.getClass().getSimpleName(), t); |
|
|
|
|
|
// Keep walking the cursor: returning here leaves syncInProgress set for the life of the
|
|
|
|
|
|
// session, so the edge never receives SyncCompletedMsg and both general downlink delivery
|
|
|
|
|
|
// and uplink processing stay gated until the session is re-established.
|
|
|
|
|
|
doSync(cursor); |
|
|
} |
|
|
} |
|
|
}, ctx.getGrpcCallbackExecutorService()); |
|
|
}, ctx.getGrpcCallbackExecutorService()); |
|
|
} else { |
|
|
} else { |
|
|
|