Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-60838

core_search: File upload does not honour timeout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.3, 3.4, 3.5
    • Fix Version/s: 3.3.4, 3.4.1
    • Component/s: Global search
    • Labels:
    • Testing Instructions:
      Hide

      I do not have a way to reproduce this problem - it happens very intermittently on our system, while doing the initial indexing of many thousands of File activities. (I'm currently running that indexing job with this fix included, fingers crossed.)

      This test simply checks that the change has not broken file indexing.

      1. You need a Moodle with working global search using Apache Solr. It should be configured to support searching document files. (If you have a default Solr installation, in my experience it works.)
      2. If necessary, run the global search indexing task (e.g. via 'Run now' from scheduled tasks screen) so that the search index is current.
      3. Create a small Word or OpenOffice document file containing a useful key word for search purposes, such as blissflooger.
      4. Add this document as a File resource to a Moodle course. (You can normally do this simply by turning editing on and dragging the file into a course section.)
      5. Ensure that the global search indexing task runs again.
        • EXPECTED: Indexing should complete without error and should include at least 1 file resource.
      6. Search for blissflooger.
        • EXPECTED: The document you added is returned in search results.
      Show
      I do not have a way to reproduce this problem - it happens very intermittently on our system, while doing the initial indexing of many thousands of File activities. (I'm currently running that indexing job with this fix included, fingers crossed.) This test simply checks that the change has not broken file indexing. You need a Moodle with working global search using Apache Solr. It should be configured to support searching document files. (If you have a default Solr installation, in my experience it works.) If necessary, run the global search indexing task (e.g. via 'Run now' from scheduled tasks screen) so that the search index is current. Create a small Word or OpenOffice document file containing a useful key word for search purposes, such as blissflooger . Add this document as a File resource to a Moodle course. (You can normally do this simply by turning editing on and dragging the file into a course section.) Ensure that the global search indexing task runs again. EXPECTED: Indexing should complete without error and should include at least 1 file resource. Search for blissflooger . EXPECTED: The document you added is returned in search results.
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull Master Branch:
      MDL-60838-master

      Description

      When uploading files to the Solr server (as opposed to normal text documents), a curl object is used to make a POST request, instead of the Solr library object.

      There is no timeout setting to the curl object which means that if the remote server has a problem, it may never time out, potentially causing the scheduled task never to complete, and causing various problems. For example, the task lock in the database may be held, meaning that indexing does not continue even when a later cron task runs. (This has happened on our test system.)

      Since the Solr config already has a timeout setting, this should be applied to the curl object as well as the other requests.

        Attachments

          Activity

            People

            • Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Peer reviewer:
              David Monllaó
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Ankit Agarwal
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jan/18