Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index: Assigning dataset level permissions only partially indexess on save until new role added. #3039

Closed
kcondon opened this issue Mar 28, 2016 · 5 comments
Assignees
Milestone

Comments

@kcondon
Copy link
Contributor

kcondon commented Mar 28, 2016

This affects builtin and shib users alike.
Scenario:

  1. published dv
  2. unpublished ds with 2 files
  3. assign admin or curator roles to user to that ds
  4. as that user, navigate to that dv and do not see ds card but can see files cards.
  5. add a file downloader role to any user in that ds or dv, such as to dataverseAdmin
  6. now see ds card with ds admin role.

I believe this happens with all role assignments, cards not appearing until another is added.
This happens with deleting/removing role assignments too.

This was happening in v4.3

@pdurbin
Copy link
Member

pdurbin commented Mar 29, 2016

Tentatively, the one line change below may be a fix (I'm on 0c13184) but I'm not sure if doing additional indexing will have a big performance impact. I'll study this some more:

murphy:dataverse pdurbin$ git diff src/main/java/edu/harvard/iq/dataverse/search/SolrIndexServiceBean.java
diff --git a/src/main/java/edu/harvard/iq/dataverse/search/SolrIndexServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/search/SolrIndexServiceBean.java
index d8bf349..2c1a162 100644
--- a/src/main/java/edu/harvard/iq/dataverse/search/SolrIndexServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/search/SolrIndexServiceBean.java
@@ -410,6 +410,7 @@ public class SolrIndexServiceBean {
         } else if (definitionPoint.isInstanceofDataset()) {
             // index the dataset itself
             indexPermissionsForOneDvObject(definitionPoint);
+            dvObjectsToReindexPermissionsFor.add(definitionPoint);
             // index files
             Dataset dataset = (Dataset) definitionPoint;
             for (DataFile datafile : filesToReIndexPermissionsFor(dataset)) {
murphy:dataverse pdurbin$ 

@pdurbin
Copy link
Member

pdurbin commented Mar 30, 2016

The way you can tell that the fix above helps is that the "Number of dvObject permissions indexed for" count changes from 0 to 1 if you run /Applications/NetBeans/glassfish4/glassfish/bin/asadmin set-log-levels edu.harvard.iq.dataverse.search.IndexAsync=FINE.

pdurbin added a commit to pdurbin/dataverse that referenced this issue Mar 30, 2016
@pdurbin
Copy link
Member

pdurbin commented Mar 30, 2016

For now I put the fix above at pdurbin@fd56686#commitcomment-16900492 since I was able to exercise this bug while working on #1012.

@pdurbin
Copy link
Member

pdurbin commented Mar 31, 2016

Fixed in pull request #3051. Passing to QA.

@pdurbin pdurbin assigned kcondon and unassigned pdurbin Mar 31, 2016
@kcondon
Copy link
Contributor Author

kcondon commented Mar 31, 2016

This works, will check index all performance over night. Closing
Index all with the change took 23917156 milliseconds
Index all without the change took

@kcondon kcondon closed this as completed Mar 31, 2016
scolapasta added a commit that referenced this issue Apr 1, 2016
@scolapasta scolapasta modified the milestones: 4.3.1, 4.4 May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants