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 |
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
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.
Fixed. Please test https://github.com/NCIOCPL/cdr-tools/blob/ocecdr-4541/DevTools/Utilities/ReindexByDocType.py, ~volker
I was able to run the re-index command for DEV, QA, and STAGE successfully.
Elapsed: 0:00:00.001400