release 0.5.3: 2meet-data-optimizer-hivepress-addon #7

Merged
wpdev merged 2 commits from release/0.5.3 into main 2026-10-07 14:02:52 +08:00
Owner

0.5.3 — 瀏覽數 flush 不再造成漂移

TMDO_Listing_Stats::flush_views_to_postmeta() 用原子 UPDATE … meta_value + N 把 warm zone 的瀏覽數加回 hp_view_count,繞過 meta API:

  • Hook Bus 看不到 → dual_write/shadow_read 下扁平表 hp_view_count 每批落後(dev39 夜間 drift-check 10/05、10/06 diff=1)
  • 物件快取(Redis)一直是舊值

修正:UPDATE 後清掉該篇的 post_meta 快取;原生仍是真相時,逐一重建含 hp_view_count、且適用該 post type 的群組(hp_listing_core/hp_request_core;不帶 post type 的 get_field() 只回最後登記的那組)。aeav_only 不動。

0.5.2 — attribute bridge 的 meta key

TMDO_HivePress_Attribute_Bridge 用 HivePress 實際的 hp_{slug}(原本組成 hp_{model}_{slug},資料庫裡不存在)。

驗證

  • unit:148 tests OK
  • wp tmdo lint --strict:pass
  • dev39 整合測試 tests/tmdo-view-count.php:flush 後 meta 快取正確、所有群組 hp_view_count 無 miss/diff/extra;wp tmdo drift-check post 全部 0
  • dev39 三份 playbook 0 FAIL
## 0.5.3 — 瀏覽數 flush 不再造成漂移 `TMDO_Listing_Stats::flush_views_to_postmeta()` 用原子 `UPDATE … meta_value + N` 把 warm zone 的瀏覽數加回 `hp_view_count`,繞過 meta API: - Hook Bus 看不到 → dual_write/shadow_read 下扁平表 `hp_view_count` 每批落後(dev39 夜間 drift-check 10/05、10/06 diff=1) - 物件快取(Redis)一直是舊值 修正:UPDATE 後清掉該篇的 `post_meta` 快取;原生仍是真相時,逐一重建含 `hp_view_count`、且適用該 post type 的群組(`hp_listing_core`/`hp_request_core`;不帶 post type 的 `get_field()` 只回最後登記的那組)。aeav_only 不動。 ## 0.5.2 — attribute bridge 的 meta key `TMDO_HivePress_Attribute_Bridge` 用 HivePress 實際的 `hp_{slug}`(原本組成 `hp_{model}_{slug}`,資料庫裡不存在)。 ## 驗證 - unit:148 tests OK - `wp tmdo lint --strict`:pass - dev39 整合測試 `tests/tmdo-view-count.php`:flush 後 meta 快取正確、所有群組 hp_view_count 無 miss/diff/extra;`wp tmdo drift-check post` 全部 0 - dev39 三份 playbook 0 FAIL
wpdev added 2 commits 2026-10-07 12:14:01 +08:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(2meet-data-optimizer-hivepress-addon): 0.5.3 view-count flush keeps flat row and meta cache in sync
Tests / PHP Lint (pull_request) Successful in 6s
Tests / Unit Tests (pull_request) Successful in 53s
Tests / Integration Tests (pull_request) Successful in 1m13s
763f705ac1
flush_views_to_postmeta() adds warm-zone views back with a direct UPDATE,
which the Hook Bus never sees: under dual_write/shadow_read the
hp_listing_core.hp_view_count column drifted after every hourly batch and
the (Redis) object cache kept the old count. After the UPDATE, drop the
post's meta cache and, while native is still the source of truth, rebuild
the entity's flat row with migrate_entity().
wpdev merged commit d6fd831416 into main 2026-10-07 14:02:52 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wpdev/2meet-data-optimizer-hivepress-addon#7