Uploaded image for project: 'mod-circulation-storage'
  1. mod-circulation-storage
  2. CIRCSTORE-387

RequestExpirationService hangs on EventPublisherService exception

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • TBD
    • Resolution: Done
    • None
    • 16.0.0
    • None
    • CP: Sprint 154, CP: Sprint 155, CP: Sprint 156
    • 3
    • Core: Platform
    • Implementation coding issue

    Description

      https://github.com/folio-org/mod-circulation-storage/blob/e94abbbd397f14b1d38912dcf2e8761f98d78516/src/main/java/org/folio/service/RequestExpirationService.java#L74-L85

            .onComplete(v -> {
              if (v.failed()) {
                pgClient.rollbackTx(conn, done -> {
                  log.error("Error in request processing", v.cause());
                  promise.fail(v.cause());
                });
              } else {
                context.forEach(p -> eventPublisherService
                  .publishLogRecord(new JsonObject().put(REQUESTS.value(), p), REQUEST_EXPIRED));
                pgClient.endTx(conn, done -> promise.complete());
              }
            })));
      

      If eventPublisherService.publishLogRecord throws an exception the promise is neither failed nor completed and the request to /scheduled-request-expiration will never get any response. /scheduled-request-expiration is called every 2 minutes. This might be the cause of OKAPI-1141.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                julianladisch Julian Ladisch
                julianladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases