File tree Expand file tree Collapse file tree
sdk/src/main/java/software/amazon/lambda/durable/execution Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -230,15 +230,15 @@ public void deregisterActiveThread(String threadId) {
230230 }
231231
232232 private void preSuspendCheck () {
233- if ( operationStorage .values ().stream ().anyMatch (o -> switch (o .type ()) {
233+ var hasAnyPendingOperation = operationStorage .values ().stream ().anyMatch (o -> switch (o .type ()) {
234234 case STEP -> o .status () == OperationStatus .PENDING ;
235235 case WAIT , CALLBACK -> o .status () == OperationStatus .STARTED ;
236236 case CHAINED_INVOKE -> o .status () == OperationStatus .PENDING || o .status () == OperationStatus .STARTED ;
237237 default -> false ;
238- })) {
239- logger . debug ( "Found pending operations. Good to suspend now." );
240- } else {
241- logger .warn ("Invalid suspension. No operation is in progress " );
238+ });
239+
240+ if (! hasAnyPendingOperation ) {
241+ logger .warn ("Invalid suspension. No operation is pending " );
242242 }
243243 }
244244
You can’t perform that action at this time.
0 commit comments