CDR Tickets

Issue Number 4541
Summary Fix Bug in Reindex Program
Created 2018-10-30 16:06:05
Issue Type Bug
Submitted By Englisch, Volker (NIH/NCI) [C]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Closed
Resolved 2018-11-01 10:01:24
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.235160
Description

When running the reindex-job on QA or STAGE I'm seeing the following error:

reindexing CDR0000793696 Traceback (most recent call last): File "ReindexByDocType.py", line 23, in <module> resp = cdr.reindex("guest", doc_id, tier=opts.tier) File "c:\cdr\lib\Python\cdr.py", line 2293, in reindex raise Exception(error) Exception: No audit trail for document creation

Comment entered 2018-10-30 16:06:54 by Englisch, Volker (NIH/NCI) [C]

Message from Bob:

The cdr.reindex() call is being give the tier option, but the database query is not. So you're probably querying the DEV tier and reindexing on QA or STAGE. The fix is to open a read-only cursor on the requested tier, and pass that cursor to the query.execute() call.

Comment entered 2018-11-01 10:01:24 by Kline, Bob (NIH/NCI) [C]
Comment entered 2018-11-16 13:44:38 by Englisch, Volker (NIH/NCI) [C]

I was able to run the re-index command for DEV, QA, and STAGE successfully.

Elapsed: 0:00:00.001400