Skip to content

保证 POI 管理更新的事务一致性 - #20

Merged
4evour merged 1 commit into
mainfrom
codex/pr-poi-transactional-updates
Aug 22, 2026
Merged

保证 POI 管理更新的事务一致性#20
4evour merged 1 commit into
mainfrom
codex/pr-poi-transactional-updates

Conversation

@4evour

@4evour 4evour commented Aug 21, 2026

Copy link
Copy Markdown
Owner

变更内容

  • POI JSON 先写入同目录临时文件,再原子替换目标文件;失败时清理临时文件。
  • 管理端在 POI 副本上修改,写盘成功后才提交内存状态。
  • 为每个城市数据增加共享读锁和独占写锁。
  • 成功更新后重建搜索索引并清理响应缓存。
  • 增加原子保存、索引重建、缓存失效和同步边界回归测试。

一致性保证

更新链路调整为:副本修改 → 原子持久化 → 内存提交 → 搜索重建 → 缓存清理。写盘失败不会留下已经修改的进程内状态。

验证

  • node tests/test_poi_admin_consistency_contract.js
  • cmake --build build --config Release
  • ctest --test-dir build -C Release --output-on-failure:1/1 通过。
  • git diff --cached --check:通过。

合并顺序

这是迁移栈的第 3 个 PR,基于第 2 个 PR #19。请按 #18#19 → 本 PR 的顺序合并。

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@4evour, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 28 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 098edd5e-a6cd-47b3-a334-a21d0f84e00f

📥 Commits

Reviewing files that changed from the base of the PR and between ee60806 and 0bc05f9.

📒 Files selected for processing (10)
  • CHANGELOG.md
  • include/tourpass/api.h
  • include/tourpass/search.h
  • include/tourpass/service_runtime.h
  • src/api.cpp
  • src/data_loader.cpp
  • src/search.cpp
  • src/service_runtime.cpp
  • tests/test_main.cpp
  • tests/test_poi_admin_consistency_contract.js

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@4evour
4evour force-pushed the codex/pr-agent-session-safety branch from 273f5f5 to f8019af Compare August 22, 2026 10:12
@4evour
4evour force-pushed the codex/pr-poi-transactional-updates branch from 4ca93d4 to 0bc05f9 Compare August 22, 2026 10:12
@4evour
4evour changed the base branch from codex/pr-agent-session-safety to main August 22, 2026 10:21
@4evour
4evour marked this pull request as ready for review August 22, 2026 10:21
@4evour
4evour merged commit 0867da7 into main Aug 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant