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

core_search: File upload does not honour timeout

XMLWordPrintable

    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • MDL-60838-master
    • 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.

      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.

            quen Sam Marshall
            quen Sam Marshall
            David Monllaó David Monllaó
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Ankit Agarwal Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.