Add option to rebuild reporter.materialized_simple_record to pingest.pl

Bug #1811696 reported by Jason Stephenson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Recent IRC discussion (http://irc.evergreen-ils.org/evergreen/2019-01-11#i_390371) revealed that pingest.pl will not rebuild the reporter.materialized_simple_record table.

As the original author of pingest.pl, I think that rebuilding this table should be added as an option to pingest.pl. This would be a positive option, i.e. to make it rebuild the table, rather than a negative, or skip, option.

Tags: pullrequest
Changed in evergreen:
assignee: nobody → Jason Stephenson (jstephenson)
Jason Boyer (jboyer)
Changed in evergreen:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Jason Stephenson (jstephenson) wrote :

So, I have added an option to pingest.pl to update the rmsr entries for the ingested records rather than rebuild the entire table. I decided to go this route because rebuilding the entire table cannot be done in parallel and doing so in pingest.pl would end up being done in its own process and would just do what can be done now, via psql. A feature to completely rebuild the table could still be added, as part of my branch if so desired.

Now that I have done the work and started testing it, this feature seems less useful to me than it did ten days ago in IRC.

Anwyay, here is the branch: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1811696-pingest-update-rmsr-option

I will refrain from adding the pullrequest tag until after my current test run completes successfully.

Jason Boyer (jboyer)
Changed in evergreen:
status: Confirmed → New
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Here's the branch that actually addresses this bug's description, in retrospect, this option is more useful, so when testing this feature, use this branch and not the one in comment #1.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1811696-pingest-rebuild-rmsr-option

Testing should be pretty simple: Run pingest.pl with the --rebuild-rmsr option. Depending on the size of your database and other options, the first process to finish should be the one that did the rebuild. Check that your reporter.materialized_simple_record makes sense for your version of Evergreen.

A better way to test would be to start out with a database where reporter.materialized_simple_record has the title fields in normalized (i.e. lower case) form. Then upgrade it to a version of Evergreen where the titles should be in mixed case, i.e. 3.2. Now, run pingest.pl with the above option and see that the case of titles has changed.

tags: added: pullrequest
Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
Changed in evergreen:
milestone: none → 3.3-beta1
Revision history for this message
Jason Stephenson (jstephenson) wrote :

FYI: I rebased the branch on master today and squashed in a small bug fix for keeping track of the child process that is rebuilding the reporter.materialized_simple_record table.

Bill Erickson (berick)
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
status: New → Confirmed
Revision history for this message
Bill Erickson (berick) wrote :

Code works as expected, but I have a question.

Given that reporter.materialized_simple_record is ultimately rebuilt from data in metabib.wide_display_entry (via reporter.old_super_simple_record), should pingest.pl wait to call rmsr_rebuild() until after the main reingest completes and the display entries have been updated?

Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
Changed in evergreen:
milestone: 3.3-beta1 → 3.3-rc
Changed in evergreen:
milestone: 3.3-rc → 3.next
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Removing pull request tag to make the change suggested by Bill Erickson in comment #4.

tags: removed: pullrequest
Changed in evergreen:
assignee: nobody → Jason Stephenson (jstephenson)
tags: added: pullrequest
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I force pushed a rebased branch with Bill's suggestion to do the rebuild of the reporter.materialized_simple_record table after the other ingests have finished.

working/user/dyrcona/lp1811696-pingest-rebuild-rmsr-option

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1811696-pingest-rebuild-rmsr-option

Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master for inclusion in 3.4. Thanks, Jason and Bill!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
Changed in evergreen:
milestone: 3.next → 3.4-beta1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.