RedisFullCheck icon indicating copy to clipboard operation
RedisFullCheck copied to clipboard

目标集群和源集群 hash类型filed属性对应的value不一致,但校验工具并未校验出来

Open koolboy2016 opened this issue 5 years ago • 6 comments

冲突key情况如下: 目标集群hash key: key名 field1 value1
源集群hash key: key名 field1 value2 hash key名相同,field1也相同,但是对应的value不同,校验工具校验显示 0 filed conflict,同时 结果文件result.db也没有记录

koolboy2016 avatar Nov 26 '19 03:11 koolboy2016

有bug 出现在 image key outline verifier里面RecheckTTL的时候,key.SourceAttr.ItemCount还是0,造成RecheckTTL中后面没有去检测

shuff1e avatar Dec 02 '19 07:12 shuff1e

image 我也遇到这个bug, full value verifier里面是没问题的,因为
p.FetchTypeAndLen(noTypeKeyInfo, sourceClient, targetClient)
里面为key.SourceAttr.ItemCount赋了值

shuff1e avatar Dec 02 '19 07:12 shuff1e

https://github.com/alibaba/RedisFullCheck/blob/develop/src/full_check/full_check/scan.go#L97
修改成

					keysInfo = append(keysInfo, &common.Key{
						Key:          bytes,
						Tp:           common.EndKeyType,
						ConflictType: common.EndConflict,
						SourceAttr: common.Attribute{ItemCount: 1},
					})

应该可以恢复

shuff1e avatar Dec 02 '19 08:12 shuff1e

冲突key情况如下: 目标集群hash key: key名 field1 value1 源集群hash key: key名 field1 value2 hash key名相同,field1也相同,但是对应的value不同,校验工具校验显示 0 filed conflict,同时 结果文件result.db也没有记录

我是在comparemode是3的时候,3: only compare keys outline,发现的bug。 其他comparemode下,没有发现检测不出来冲突的情况

shuff1e avatar Dec 03 '19 03:12 shuff1e

@koolboy2016 你当初的校验comparmode是多少?

vinllen avatar Dec 03 '19 03:12 vinllen

这个我没有指定,用的是默认值

koolboy2016 avatar Dec 05 '19 02:12 koolboy2016