Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27735

Solr index not updated immediately after change content priority

    Details

      Description

      Steps to reproduce

      1. Create fresh installation of latest eZ Publish (5.4.10)
      2. Configure Solr (4.10.4)
      3. Create article
        1. Check Solr index - create article should has main_location_priority_i set to 0
      4. Change article priority, for e.g. 8
        1. Check Solr index - updated article should has main_location_priority_i set to 8, but there is still 0
      5. Change article priority, set it again to 8
        1. Check Solr index - now updated article will has main_location_priority_i set to 8

      The issue appears only during the first occurrence of changing the value. Every next change is properly indexed.

      Additional information from the customer

      We created a new article and published the object again. After it we changed the priority for this new obeject. The search handler use eZ\Publish\Core\Persistence\Cache\LocationHandler::loadLocationsByContent. But in this method the line
      if ($cache->isMiss()) {
      delivers false so that the location will be used from stash cache. The stash cache has still the old priority 0. So the Solr object will be updated but with the old priority with value 0. So in Solr we have the old priority until the object will be updated.
      But if we change the priority a second time the same line
      if ($cache->isMiss()) {
      will deliver true. Then the location will be fetched again and the new priority will be used for sending data to Solr. So the editor has to change the priority twice to update the Solr object. This behaviour we have in dev and prod mode.

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Confirmed Confirmed
          3h 17m 1 Kamil Madejski 01/Aug/17 3:14 PM
          Confirmed Confirmed InputQ InputQ
          1m 6s 1 Kamil Madejski 01/Aug/17 3:15 PM
          InputQ InputQ Development Development
          5s 1 Kamil Madejski 01/Aug/17 3:15 PM
          Development Development Development Review Development Review
          12d 20h 33m 1 Kamil Madejski 14/Aug/17 11:48 AM
          Development Review Development Review Documentation Review done Documentation Review done
          10d 4h 17m 1 André Rømcke 24/Aug/17 4:06 PM
          Documentation Review done Documentation Review done QA QA
          16h 28m 1 Rui Silva 25/Aug/17 8:34 AM
          QA QA Closed Closed
          3h 47m 1 Paulo Nunes 25/Aug/17 12:22 PM

            People

            • Assignee:
              Unassigned
              Reporter:
              Kamil Madejski
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: