修复事务队列,正常插入到队尾 - #2
Hidden character warning
Conversation
PR Summary by QodoFix TxQueue ordering/free-list growth and unify GTest/CTest unit_tests target
AI Description
Diagram
High-Level Assessment
Files changed (12)
|
Code Review by Qodo
1.
|
|
/review |
| # ── 检查 6379 端口占用 ──────────────────────────────────── | ||
| if ss -tlnp | grep -q ":6379 "; then | ||
| echo "ERROR: Port 6379 is already in use." | ||
| echo "Please free port 6379 before running tests." | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
5. Port check false-negative 🐞 Bug ☼ Reliability
多个脚本在 set -euo pipefail 下使用 ss -tlnp | grep 做端口占用检测,但当环境缺少 ss 或者 ss -p 因权限看不到进程信息时,检测会误判“端口空闲”。随后启动服务/测试会在 bind 或连接阶段以更难定位的方式失败(EADDRINUSE/连接到旧进程)。
Agent Prompt
### Issue description
Scripts depend on `ss -tlnp` for port-in-use detection. On systems without `ss` (e.g. some macOS/minimal containers) or where `-p` output is restricted, the check can become a false-negative and later steps fail with `EADDRINUSE` or connect to an unexpected process.
### Issue Context
The port check is used in benchmark/integration/unit-test scripts.
### Fix Focus Areas
- scripts/run_unit_tests.sh[11-16]
- scripts/run_benchmark.sh[15-20]
- scripts/run_integration_tests.sh[16-21]
### Suggested fix
- Guard with `command -v ss >/dev/null` and fall back to another method (`lsof -iTCP:$PORT -sTCP:LISTEN`, `netstat`, or a small Python bind test).
- Consider using `ss -tln` (no `-p`) to avoid permission-related visibility issues.
- If no checker is available, print a warning and skip the pre-check (do not silently assume the port is free).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit 0361146 |
No description provided.