Giter Club home page Giter Club logo

Comments (6)

suxb201 avatar suxb201 commented on June 24, 2024

问题一:Redis 特性,scan 不保证数量,游标为 0 才表示 scan 完了
问题二:没明白你意思,如果大量 key 带有过期时间的话,dbsize 确实会不一样:https://tair-opensource.github.io/RedisShake/zh/others/consistent.html

from redisshake.

52hzbobo avatar 52hzbobo commented on June 24, 2024

scan的游标是为0了,但是主要是[问题2]19w的源端数据同步到集群
存在596条没有成功到目标端redis集群 ,这些数据有效期是604800秒
用java代码对比打印日志:过期时间都是在清除(目标端集群)数据后重新用redisshake进行rdb+aof同步
差异的数据是在重新开始同步的前几个小时内小部分数据
contrasKey:>>> RESOURCES:8fe0f2aa9f4536537325d4655e1e1d3a <-----> expire_time:339983
contrasKey:>>> RESOURCES:29657a29bee3580fd612f3c5eca6a8d9 <-----> expire_time:340314
contrasKey:>>> RESOURCES:7b961a48a2a14b852ef348e3a7331cbe <-----> expire_time:339627
contrasKey:>>> RESOURCES:286e0973863608030e7e3bae63873e2c <-----> expire_time:339829
目标端的集群还未开始正式有服务接入,只是在盘点数据发现差异

from redisshake.

suxb201 avatar suxb201 commented on June 24, 2024

过期时间都是在清除(目标端集群)数据后重新用redisshake进行rdb+aof同步

没明白意思

from redisshake.

52hzbobo avatar 52hzbobo commented on June 24, 2024

简单过程背景说就是:

  1. 在05-24 14:00 清除目标库(集群)
  2. 并RedisShake重新开始跑生产的单机-->目标集群
  3. [sync_reader] sync_rdb = true sync_aof = true
  4. 周一过来观察数据发现差异条数问题,写了jar对比key
  5. 发现596条key没有在集群中,而且丢失的key都是在 05-24 09:00 ~ 05-24 : 14:00左右key

from redisshake.

52hzbobo avatar 52hzbobo commented on June 24, 2024

开发和测试由于业务量问题 key 并没有存在差异(运维写py脚本通过keyspace对比)
就是看下 在哪些使用场景会导致key丢失
注:目标集群库并没有业务使用,丢失的key也没有哪些条件下会删除

from redisshake.

suxb201 avatar suxb201 commented on June 24, 2024

@52hzbobo 我也想不明白,需要你自己想办法查一查了。几个怀疑方向你可以看一下:

  1. 目的端触发了 evict
  2. 数据是周一停止 shake 同步后才刚写入的
  3. 如果 shake 没停,一直在写入,本身同步有延迟可能数据是刚写入源端,还没同步至目的端

from redisshake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.