CDR Tickets

Issue Number 4849
Summary Pub Preview error Ambigous CDR ID
Created 2020-07-02 10:55:13
Issue Type Inquiry
Submitted By Osei-Poku, William (NIH/NCI) [C]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Closed
Resolved 2020-09-03 07:51:54
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.265429
Description

We are not able to generate PP for this DIS - CDR0000495778. The error message displayed is 

"Ambiguous CDR ID -495778"

Since this error occurs for only this document, it appears to be a data problem but it is not clear exactly what is wrong with the data. 

Comment entered 2020-07-02 12:48:43 by Englisch, Volker (NIH/NCI) [C]

, it appears that every attempt to create a PP report for this DIS creates an unpublished version of the document in Drupal.  There are currently 20 unpublished "versions" for this document in Drupal.  The PP report for other DIS works as expected. 

Is it correct for the PP report to create a document in Drupal?  I didn't think it is but my experience with the new PP report is very limited.

Comment entered 2020-07-02 15:13:07 by Kline, Bob (NIH/NCI) [C]

Yes. That's how the PP subsystem is able to reflect so faithfully the layout for the document as it will look when it is published. This is what summary PP does:

  1. send the version the user has select to Drupal, storing a node with the negative version of the CDR ID (to distinguish it as a temporary document, not the live version seen on the web site by the public)

  2. ask Drupal for the rendered page for the newly created node

  3. delete the temporary node

  4. show the user the rendered page

It seems that for this document ended up with step 3 failing (perhaps a user submitted the same publish preview request twice, one immediately after the other).

I have deleted all the temporary documents (there were lots of them – the users should be aware that once a PP document gets into this state, trying again will never succeed until the problem is cleaned up, it will only make that cleanup harder by creating dozens of nodes to be deleted).

I see that the published document has a draft, which as far as I can see is indistinguishable from the version the public sees. Both are marked as updated October 18, 2019. Does anyone know what the latest change made to this document might be? If no one objects, I propose to publish the draft, in case the presence of that draft version was in any way involved in the PP failure. Then I will ask the users to test PP again (probably best not to do that before the draft is taken care of).

Comment entered 2020-07-02 18:50:06 by Englisch, Volker (NIH/NCI) [C]

Is there a way to find out how many PDQ documents might have such a DRAFT version which might block future PP reports?  

Maybe you could show me sometime how to remove a node so that I could take care of the clean-up next time.

Comment entered 2020-07-07 10:05:01 by Kline, Bob (NIH/NCI) [C]

I never got an answer about whether I should publish the draft for CDR495778, and now it appears that the draft is no longer present (perhaps overtaken by the Friday job).

As far as I have been able to tell from my analysis following my previous comment above, the presence of a draft and the PP failures are unrelated. In other words, the fact that a summary has a draft does NOT prevent publish preview from working correctly (as long as users are patient and don't slam the server with multiple requests for the same preview at once).

Is there a way to find out how many PDQ documents might have such a DRAFT version ...

I pulled down a copy of the production database and ran some queries. There are 127 such drafts. See attachment.

... which might block future PP reports?

No, as noted above, the presence of the draft does not appear to prevent PP from working. As far as I can tell, all of the docs on the list are previewable. Let me know if you run into counter examples (being careful not to submit multiple simultaneous preview requests for the same document).

Comment entered 2020-07-07 16:50:57 by Osei-Poku, William (NIH/NCI) [C]

Sorry for the delay in responding. PP does work for this DIS now. Does it matter if requests for PP for a particular document are made by different users almost at the same time? Would that cause the same problem or it has to be from the same user for this problem to happen? Also, could there be a better solution for this problem rather than making sure that no successive requests for PP are made for a particular document? I don't think we can control that in all circumstances.

Comment entered 2020-07-07 18:47:45 by Kline, Bob (NIH/NCI) [C]

Don't really know many details about the exact conditions needed to cause the problem. It would be unlikely, but possible, for two different users to submit requests close enough in time to create the problem. If exercising reasonable care to avoid bursts of multiple requests for preview of the same document by the same user doesn't eliminate most of the issues, we may have to examine other measures, but for now let's try this approach.

Comment entered 2020-07-09 11:38:11 by Osei-Poku, William (NIH/NCI) [C]

Okay. We will document any new cases that come up to see if there is the need to revisit this issue. Thanks!

Comment entered 2020-07-09 17:09:19 by Osei-Poku, William (NIH/NCI) [C]

We just came across another occurrence of this problem but this time, it is for a summary document 62675.

Comment entered 2020-07-09 19:14:36 by Kline, Bob (NIH/NCI) [C]

Drupal's in the middle of a deployment right now. I'll take a look later.

Comment entered 2020-07-09 20:37:49 by Englisch, Volker (NIH/NCI) [C]

I can see that this is indeed the same issue as we saw with the DIS.  There are currently 5 copies of the same document with negative CDR-ID all created within a span of 6 minutes.

Comment entered 2020-07-10 05:50:05 by Kline, Bob (NIH/NCI) [C]

Fixed. Should work now.

Comment entered 2020-07-10 08:38:03 by Kline, Bob (NIH/NCI) [C]

Since we're changing the publish preview script for the gatekeeper retirement release anyway, I have made some additional modifications to try and prevent these failures, whatever may be the cause for them. Please test CIS and DIS publish preview on DEV to make sure I haven't broken it.

Comment entered 2020-07-14 11:57:47 by Osei-Poku, William (NIH/NCI) [C]

We've finished testing PP for DIS and CIS on DEV and they look good. Thanks!

Comment entered 2020-07-17 13:49:09 by Osei-Poku, William (NIH/NCI) [C]

We've had one more incident of the error for CDR ID 256672.

Comment entered 2020-07-17 14:35:51 by Kline, Bob (NIH/NCI) [C]

Fixed. You may see more of these until the gatekeeper retirement code is deployed, but I'm hoping after that happens this problem will be a thing of the past.

Comment entered 2020-09-03 07:51:18 by Kline, Bob (NIH/NCI) [C]

I'll leave you to close this one, , whenever you're satisfied that the problem has been fixed.

Comment entered 2020-09-17 13:20:48 by Osei-Poku, William (NIH/NCI) [C]

This issue has not happened again since the gatekeeper retirement release so I am closing this ticket. Thank you!!

Attachments
File Name Posted User
DIS Pub Preview Error.PNG 2020-07-02 10:54:34 Osei-Poku, William (NIH/NCI) [C]
drafts-20200707.txt 2020-07-07 10:06:03 Kline, Bob (NIH/NCI) [C]
summary_PP_ambigous_error.PNG 2020-07-09 17:09:07 Osei-Poku, William (NIH/NCI) [C]

Elapsed: 0:00:00.002026