Dev zhongli#981
Conversation
|
有两个点需要再看下:
|
…oop (alibaba#976) break inside switch does not exit the enclosing for-range, leaving disk-stored oplog unreachable. Use labeled break.
…ught up (alibaba#979) retrieve goroutine hits MemoryApply after restart shortcut and Panicf-s. Add explicit MemoryApply case that exits the goroutine.
5ab49da to
f3f0063
Compare
|
还有两个点需要再看下:
|
感谢评审 🙏,两点都已修,单独 commit 推上来了。 1. compound hashed shard key 确认是 bug,根因在 具体改动:
回归用例:
2. verify_orphan_filter.py Case B 完全同意「只断 warning 文案不够」。已经在 Case B 里补一条与 Case C对齐的行为断言: behaved_as_unfiltered = (rc != 0 or cnt < 2)
case("filter actually disabled (baseline behaviour)",
behaved_as_unfiltered,
f"rc={rc} dest_count={cnt} (expect rc!=0 or dest<2)")即「mongos + orphan_document=true 模式下,dest 必须出现和 Case C(filter 关闭)一样的失败形态」。这样后续如果出现「日志打 warning、行为却被静默改回」的回归,这条断言会先挂。 |
|
Case B 这里的期望还需要再调整一下。 我本地按这套 也就是说配置了 现在 README 里的 Case B 期望也需要一起改一下。 |
9fd8a38 to
20aa4e4
Compare
…ibaba#978) When mongo_s_url is set, full sync routes through mongos and chunk map is never loaded, so orphan_document=true silently has no effect. - full.go: emit Warnf when orphan filter is requested but MongoS != nil - doc_executor.go: skip orphan check on unmarshal failure instead of panic - unit tests for OrphanFilter range/compound/hashed boundaries - integration test scaffold (docker-compose + inject + verify 3 cases) - standalone mode: implement SetDirect(true) for directConnection - GetColShardType: support int32/int64 shard key values Co-Authored-By: Claude Code <noreply@anthropic.com> AI-Model: claude-opus-4-6 AI-Contributed/Feature: 2/2 AI-Contributed/UT: 0/0
- getBsonType: keep int64 raw to avoid float64 precision loss above 2^53 - getBsonType: handle primitive.MinKey/MaxKey from real BSON decode - ComputeHash: add bool/DateTime/Timestamp/nil type support Co-Authored-By: Claude Code <noreply@anthropic.com> AI-Model: claude-opus-4-6 AI-Contributed/Feature: 233/326 AI-Contributed/UT: 0/178
…s and local paths Replace hardcoded MongoDB test URIs (containing real internal/public IPs and plaintext credentials) and a hardcoded personal CA pem path with env-var driven loading, so the repo never ships environment-specific secrets and other developers can supply their own values. AI-Contributed/Feature: 0/98 AI-Contributed/UT: 0/51
Co-Authored-By: Claude Code <noreply@anthropic.com> AI-Model: claude-opus-4-6 AI-Contributed/Feature: 2/2 AI-Contributed/UT: 0/0
TestShouldSkipDupKeyOnInsert and TestHandleDupKeyOnInsertStrategy have been failing since they were added in alibaba#973. 1. Test fixture mismatch with production 2. _id_ falls through wildcard rules AI-Contributed/Feature: 0/10 AI-Contributed/UT: 0/29
20aa4e4 to
d0624f6
Compare
|
这里 现在
后面
但后者按 Timestamp 语义应该比前者大,当前代码会认为它更小。这样如果 ranged shard key 是 Timestamp,chunk 边界跨过这个点时,合法文档可能会被误判成 orphan。 建议这里不要 pack 成 signed int64,可以改成 |
…ypes getBsonType already handles ObjectID/DateTime/Timestamp/Bool but the comparison functions only had cases for MinKey/MaxKey/String/numeric. A ranged shard on _id (ObjectID) would hit the default Panicf branch in chunkLt on the first document. Add cases for BsonTypeOid (hex string compare), BsonTypeDate, BsonTypeTstamp, and BsonTypeBool (int64 compare). Also extend getBsonType to return comparable values for DateTime/Timestamp/Bool on the ranged-comparison path. Co-Authored-By: Claude Code <noreply@anthropic.com> AI-Model: claude-opus-4-6 AI-Contributed/Feature: 19/19 AI-Contributed/UT: 23/23
d0624f6 to
e132465
Compare
some fixes for recent issues: #976 #978 #979