Giter Site home page Giter Site logo

mongoshake用户权限 about mongoshake HOT 11 CLOSED

alibaba avatar alibaba commented on May 18, 2024
mongoshake用户权限

from mongoshake.

Comments (11)

vinllen avatar vinllen commented on May 18, 2024

请给出一下你的配置文件信息,和错误的全部log信息。另外,代码有改过吗?前后不一样的信息只是添加了账号?

from mongoshake.

Roarain avatar Roarain commented on May 18, 2024

from mongoshake.

vinllen avatar vinllen commented on May 18, 2024

报错的log信息给出一下,以及你邮件里说的循环风暴的日志。

from mongoshake.

vinllen avatar vinllen commented on May 18, 2024

目的数据在变应该是在同步,同步Insert的oplog就添加,delete的就删除,等全部同步完你看看是否还在变。
delete failed应该是之前的数据没了,再次删除旧出错了。在v.1.0.0应该是修复了这个问题。
使用账号密码报的这个错误应该是配置问题,tunnel的目的配的不对,你再发一遍mongoshake刚起来的时候报的错误吧。

from mongoshake.

Roarain avatar Roarain commented on May 18, 2024

src端rs的权限如之前,但是dst端rs的权限没有测试出来,暂时在dst端没有做权限控制。
做测试rs-->rs,sh-->sh,sh-->stadnalone,rs-->standalone时由于oplog的时间窗口未覆盖,获取到的所有数据都正常。
在一个实时有insert和delete业务的的mongoDB上做实时数据同步,时间轴A--B--C--D。在A时刻对src端做的全库mongodump,加上了--oplog选项,B时刻mongodump完成。C时刻dst端mongorestore完成,启动mongo-shake时参数context.start_position应该设置为多少?B时刻?精确到秒,数据也可能缺失。当前测试时给的是A时刻,有些数据重复,在src端有4条数据,但是dst端有12条。一个笨方法,只能对src端做停机备份和数据同步?请问是否有别的方法?觉得这是一个典型的数据备份问题,想要不宕机的实时同步还是宕机下的数据完整性。

from mongoshake.

Roarain avatar Roarain commented on May 18, 2024

应该是找到原因了。同事做了drop操作,但使用mongoshake时只开启了IDU操作,replayer.dml_only = true。另外由于oplog是幂等的,从哪开始都一样。再做一次同步试试。

from mongoshake.

vinllen avatar vinllen commented on May 18, 2024

对于DML是幂等的,DDL的重试不能保证幂等性

from mongoshake.

Roarain avatar Roarain commented on May 18, 2024

在测试过程中又两个疑惑。
1:src端在admin上createUser,src的oplog中有记录,但是没有同步到dst端,是否因为mongoshake不同步admin DB?
image
2:src到dst的oplog传输间隔。参数checkpoint.interval = 20还是batch_size控制。
image
根据bin/mongoshake-stat --port=9100获取到的数据,大概是凑够255条数据在dst端统一应用oplog。能否设置成3秒同步一次,无论是否到255条数据

from mongoshake.

vinllen avatar vinllen commented on May 18, 2024
  1. admin表不同步
  2. checkpoint.interval单位是ms,默认5000ms也就是5s。也就是说最小的同步checkpoint是5s。batch数据是批量传送的,存在缓存机制,batch数据传送后才会触发刷新操作。目前没法做到固定时间刷一次。

from mongoshake.

vinllen avatar vinllen commented on May 18, 2024

非标题相关问题建议多开一个issue,方便后人定位。这个问题我先关了。

from mongoshake.

marknewmail avatar marknewmail commented on May 18, 2024

mongos启用权限时,每一个节点都要加账号,否则会报no oplog ns in mongo

from mongoshake.

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.