Reviewed:  https://reviews.mahara.org/8494
Committed: 
https://git.mahara.org/mahara/mahara/commit/db77468a284d51d6f77d5f4735e5bc9a3f3be643
Submitter: Robert Lyon (robe...@catalyst.net.nz)
Branch:    16.10_STABLE

commit db77468a284d51d6f77d5f4735e5bc9a3f3be643
Author: Robert Lyon <robe...@catalyst.net.nz>
Date:   Tue Dec 19 10:37:02 2017 +1300

Bug 1738898: Elasticsearch not indexing access changes correctly

There is an add_to_queue_access() function that is meant to check what
pages have had their access changed since they were indexed. It was
designed to catch the pages which have a start/stop date.

But that is not quite sufficient.

See bug report for more info

behatnotneeded

Change-Id: I160d074fc709c7e94c9c4cacab8f2c5e6c7e9a86
Signed-off-by: Robert Lyon <robe...@catalyst.net.nz>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1738898

Title:
  Elasticsearch not updating indexed items when access rules change

Status in Mahara:
  Fix Committed
Status in Mahara 16.10 series:
  Fix Committed
Status in Mahara 17.04 series:
  In Progress
Status in Mahara 17.10 series:
  In Progress
Status in Mahara 18.04 series:
  Fix Committed

Bug description:
  When a page has it's access rules changed (but not other editing) the
  elasticsearch does not update the index for the items involved.

  There is an add_to_queue_access() function that is meant to check what
  pages have had their access changed since they were indexed. It was
  designed to catch the pages which have a start/stop date.

  But that is not quite sufficient.

  Problems:
  1) If a page is indexed and then later it's access rules are changed the page 
and it;s artefacts/blocks were not getting re-indexed to reflect the rule change

  - need the add_to_queue_access() a check for view_access rows whose
  'ctime' value is within the range being checked.

  2) If a page did get found with the add_to_queue_access() function it
  was still ignoring the blocktype 'text' and so was not updating the
  view_access rules for that

  - need to add a sql query to find these non-artefact items we want to
  index and them to the queue also

  3) Deleting of all the view_access rules for a page was not being picked up 
and so items
  were not being re-indexed

  - need to add items to queue when all access rules are removed from a view
  [this is not a problem if rules are changed as we delete all rules and add in 
new ones so can be picked up by change for (1) where we look for new access 
rules]

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1738898/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to