project-lux / lux-marklogic

Code, issues, and resources related to LUX MarkLogic
Other
3 stars 2 forks source link

Log additional details of failed searchEstimate requests #183

Closed brent-hartwig closed 3 days ago

brent-hartwig commented 1 week ago

Problem Description: During the 7 Jun 24 (#162) and 18 Jun 24 (#181) performance tests, we observed over 1,100 failed searchEstimate requests. The logs do not have enough information to investigate. This is the pattern:

2024-06-07 17:35:41.880 Notice: XDMP-JSONDOC: Document is not JSON
2024-06-07 17:35:41.880 Notice:+in /ds/lux/searchEstimate.mjs [1.0-ml]
2024-06-07 17:35:41.884 Warning: {"errorResponse":{"statusCode":400,"status":"Bad Request","messageCode":"XDMP-JSONDOC","message":"Document is not JSON"}}

Grep commands and exact counts:

# 7 Jun 24
$ grep XDMP-JSONDOC *-800[3-4]-ErrorLog-trimmed.txt | wc -l
2732
$ grep "Notice:+in /ds/lux/searchEstimate.mjs [1.0-ml]" *-800[3-4]-ErrorLog-trimmed.txt | wc -l
1366

# 18 Jun 24
grep XDMP-JSONDOC *-800[3-4]-ErrorLog-trimmed.txt | wc -l
2266
grep "Notice:+in /ds/lux/searchEstimate.mjs [1.0-ml]" *-800[3-4]-ErrorLog-trimmed.txt | wc -l
1133

Expected Behavior/Solution: Similar as #177:

Requirements: See above.

Needed for promotion: If an item on the list is not needed, it should be crossed off but not removed.

~- [ ] Wireframe/Mockup - Mike~

UAT/LUX Examples: Developer will be able to force an error and ensure the log entries are created and picked up by the log mining script.

Dependencies/Blocks: This ticket blocks https://git.yale.edu/lux-its/ml-cluster-formation/issues/24.

Related Github Issues:

177 could be implemented at the same time.

Related links: None

Wireframe/Mockup: Not needed

brent-hartwig commented 3 days ago

Implemented #177 and #183 together. See PR https://github.com/project-lux/lux-marklogic/pull/197 for implementation details.