Skip to content

[ISSUE #10438] Fix buildTopicConfigSerializeWrapper exposing live topicConfigTable reference#10439

Open
chuanxo wants to merge 1 commit into
apache:developfrom
chuanxo:fix/issue-10438-snapshot-serialize-wrapper
Open

[ISSUE #10438] Fix buildTopicConfigSerializeWrapper exposing live topicConfigTable reference#10439
chuanxo wants to merge 1 commit into
apache:developfrom
chuanxo:fix/issue-10438-snapshot-serialize-wrapper

Conversation

@chuanxo
Copy link
Copy Markdown

@chuanxo chuanxo commented Jun 7, 2026

Summary

  • buildTopicConfigSerializeWrapper() 直接将 this.topicConfigTable 引用设入 wrapper,与 dataVersion 的 copy 之间存在并发不一致
  • 修复:先 copy dataVersion,再用 new ConcurrentHashMap<>(this.topicConfigTable) 做浅拷贝,保证 wrapper 是 point-in-time 一致快照

Fixes #10438

Test plan

  • 新增 testSerializeWrapperIsSnapshot 验证 wrapper 持有独立 snapshot,后续写入不可见
  • 全量 TopicConfigManagerTest 13 个用例通过
  • checkstyle 0 violations

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.

[Bug] buildTopicConfigSerializeWrapper() exposes live topicConfigTable reference causing version-data inconsistency

1 participant