Data Profile
This category’s data primarily comes from code repositories, CI pipelines, Issue links, and contributor submissions. Daily documentation includes PR descriptions, code review comments, CI results, and merge records. Core fields include PR number, change scope, reviewer identifier, review status, CI pass rate, and merge timestamp. Data updates occur daily or weekly, triggered after each code change submission, review approval, or merge. There is no fixed batch trigger cycle.
Constraints on Database and Operations Workflows
Data sources are scattered and linked across multiple paths. Unified storage is required for structured and unstructured data from different sources, with support for multi-table join queries. Update frequency fluctuates widely. Peak periods require handling bulk data writes, so a reasonable maximum connection pool size must be configured. Fields include enumeration and numeric types such as review status and CI results, so indexes must be created to optimize query efficiency. Historical merge and review records must also be retained to support full-link verification during fault troubleshooting. Old data should not be cleaned frequently in most cases.
Configuration Settings
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://[username]:[password]@[local/cloud address]:27017/fastgpt_pr?authSource=admin | Meets the storage requirements for unstructured review records and change logs in the FastGPT v4.17.0 PR review module, and isolates dedicated business databases |
PG_URL | postgresql://[username]:[password]@[address]:5432/fastgpt_metadata | Stores structured associated data such as PR metadata, review comments, and merge records |
DB_MAX_LINK | 20–30 | Handles daily and weekly bulk data writes and query peaks, and prevents database connection exhaustion |
REDIS_URL | redis://[address]:6379/0 | Caches frequently queried review status and CI results to reduce real-time database query load |
Three Common Configuration Mistakes
- Phenomenon: No PR review-related records exist in the MongoDB collection. Cause: Authentication parameters for
MONGODB_URIare not configured correctly, or the wrong business database name is specified. - Phenomenon: MongoDB deployed locally on Windows 10 cannot be connected. Cause: Firewall permissions for the default MongoDB port 27017 are not opened, or the configured
MONGODB_URIuses an incorrect local loopback address. - Phenomenon: Connection timeout occurs when batch importing PR data. Cause: The
DB_MAX_LINKparameter is not set reasonably, and insufficient connection pool capacity causes write requests to block.
How to Confirm Correct Configuration
- Run the built-in database connectivity test tool, enter
MONGODB_URIandPG_URL. No error prompts indicate correct configuration. - Submit a test PR and complete the review process. Check whether corresponding review records and metadata are generated in the relevant database collections and tables.
- View Redis monitoring metrics to confirm that the cache instance configured via
REDIS_URLhas normal cache hit and write traffic. - Batch import simulated PR data, observe the database connection pool usage, and confirm that connection exhaustion errors are not triggered.
The values provided are common starting points and should be evaluated against the reader’s own samples.
Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.