Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30990

Fix elastic indexing retry mechanism when encountering socket timeout

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10-HF61, 2021.20
    • Component/s: Elasticsearch

      Description

      Since NXP-30841 there is a retry mechanism on write operation, but it is not working on the following case:

      org.nuxeo.ecm.core.api.NuxeoException: java.net.SocketTimeoutException: 60,000 milliseconds timeout on connection http-outgoing-27 [ACTIVE]
      	at org.nuxeo.elasticsearch.client.ESRestClient.doBulk(ESRestClient.java:376) ~[nuxeo-elasticsearch-core-2021.18.6.jar:?]
      	at org.nuxeo.elasticsearch.client.ESRestClient.lambda$bulk$2(ESRestClient.java:348) ~[nuxeo-elasticsearch-core-2021.18.6.jar:?]
      	at net.jodah.failsafe.Functions$10.call(Functions.java:252) ~[failsafe-1.1.0.jar:1.1.0]
      	at net.jodah.failsafe.SyncFailsafe.call(SyncFailsafe.java:145) ~[failsafe-1.1.0.jar:1.1.0]
      	at net.jodah.failsafe.SyncFailsafe.run(SyncFailsafe.java:81) ~[failsafe-1.1.0.jar:1.1.0]
      	at org.nuxeo.elasticsearch.client.ESRestClient.bulk(ESRestClient.java:348) ~[nuxeo-elasticsearch-core-2021.18.6.jar:?]
      	at 
      

      The SocketTimeoutException needs to be rethrow as a TooManyRequestsRetryableException

      Also, catch the ElasticsearchStatusException when a 429 is returned by AWS lb.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: