Repository navigation
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 21 minor |
| ErrorProne | 2 high |
| Security | 2 medium 1 high |
| CodeStyle | 30 minor |
| Complexity | 5 medium |
🟢 Metrics 166 complexity
Metric Results Complexity 166
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request introduces significant performance optimizations for the ingestion pipeline, including parallel processing of large observation CSVs by splitting them into chunks, compact JSON-LD serialization, and optimized GCS file listing and streaming with ranged reads. A critical issue was identified in the runner where progress, final status, and unresolved entities from worker processes are not merged back into the master process's reporter, which would result in an incomplete or incorrect final report.json.
…inary. Sharing gcs client across workers. Splitting up large files across workers. It will now scale linearly as worker count grows. Nearly full UN dataset now processes in 107s(+35s of bootup time).
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces parallel processing and performance optimizations for importing large datasets, including splitting large observation CSVs into chunks for multi-process execution, optimizing GCS file listing and connection pooling, and implementing caching for serialization. The review feedback highlights several critical correctness and concurrency issues: a potential silent data loss bug in the byte-range splitting logic when a split falls exactly on a line boundary, race conditions in concurrent cache modifications and GCS storage initialization, race conditions in parallel MCF/CSV task ordering, and a potential crash when parsing the HEADER_VALIDATION_MAX_WORKERS environment variable.
…split boundaries, and report aggregation
…mmonsorg#791) DC API calls now retry HTTP 408, 429, 500, 502, 503, and 504 using the existing exponential backoff and three-retry limit. Retries emit brief WARN messages. Final HTTP failures, missing response data, request exceptions, and invalid JSON emit one detailed ERROR with request/response context and exception stack traces when available. Only HTTP 200 responses proceed to JSON parsing. Validation: 30 tests passed, 1 skipped. Formatting checks passed.
Overview
Major performance and scalability refactor for the Simple Ingestion Preprocessor. Large observation CSV files are now chunked across worker processes using parallel byte ranges, eliminating straggler cores on high-CPU machines.
Key Changes
np.unique.runner.py,jsonld_stream_writer.py, andvariable_per_row_importer.pyinto clean, testable helper functions.Performance (UN / WHO: 2,403 files on 64 cores)
Testing
import/simpleandwebsite/import/simple.