当前位置:网站首页>"Pit" of mongoreplay
"Pit" of mongoreplay
2022-06-10 09:46:00 【51CTO】
This is how the story begins , Because I want to be a MONGODB The test library synchronizes the data of some production libraries , At the same time, I don't want to start from the basic data , Because of the large amount of data . In fact, it can be through mongoexport and mongoimport Come on , But the problem is, if you just want to capture data in a certain period of time , Or just want to reproduce the fault data in a certain period of time in the production library . How can we track these data and record , Replicate on the test library .
Actually from MONGODB 3.4 In the future, there will be a tool to help ,Mongoreplay, His main function is , Grab the packet through the network , Change the data intercepted through the network card into a specific data format , And then through replay To replay data on another library , We can think of him as something like mysql Of binlog. Of course, the principle may be different .
Where is the pit , Keep listening . When capturing data , To specify a network card , To specify the port number you want to capture
mongoreplay record -i ens32 -e "port 27027" -b 20 -p /mongodata/mongo.json

on the basis of BSON In the file you specify . Then you take this file , You can pour data into the specified MONGODB The server

Data source location , perform play Command can inject data into the test machine .
Where is the pit , During the test , Data is sometimes found without , And sometimes the data is irregular , Any command executed on the local machine cannot be found , All commands not executed on the local machine have related data fetching .
This involves , It's not about this command , It's the problem of capturing packets , In command -i The latter is the network card that must specify the data source , General machines have lo Local loop , and External physical network card . While monitoring , It is monitoring the external physical network card , The local commands are executed in lo In the circuit .
But here comes the problem , If you want a complete data pass mongoreplay It is difficult to command , Even if we produce two sets mongoreplay To grab local and Extranet data , However, we cannot identify the execution sequence in playback .
therefore mongoreplay This function , Only limited to system debugging and fault replay , For data synchronization , This function is really chicken ribs .

边栏推荐
- Build a bioinformatics r environment from 0 (step on the pit record)
- pip install . 和 pip install -e . 的区别
- 01 backpack problem
- 416. segmentation and subsets
- Kotlin 1.7.0 已发布,推出新的 Kotlin К2 编译器
- Concurrency - create thread
- 【蓝桥杯集训100题】scratch苹果熟了 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第13题
- R语言使用rpart包构建决策树模型、选择合适的树大小(复杂度)检查决策树对象的cptable内容(树的大小由分裂次数定义、预测误差)、使用plotcp函数可视化决策树复杂度参数与交叉验证错误的关系
- Lambda表达式例五
- 01背包问题
猜你喜欢

Monthly 50 f cocktails (thinking)

你的下一台电脑何必是电脑,探索不一样的远程操作

分享|数字孪生交通应用(附PDF)

Niuke monthly race 50D birthday (calculated contribution)
![QQ wechat enables continuous message sending [code implementation]](/img/a1/9ceb1bd855fdfbb9926d00ac8ac151.png)
QQ wechat enables continuous message sending [code implementation]

795 D Max GEQ sum (monotone stack +rmq)

PHP语言的课程体系了解怎么样呢

【黑马早报】蚂蚁集团暂无启动IPO计划;薇娅老公成立新直播公司;微博CEO质问顺丰;京东将试点餐饮外卖业务;腾讯人才管理体系大调整...

HMM details + examples

#795 D Max GEQ Sum(单调栈+RMQ)
随机推荐
R 创建文件夹和子文件夹
Ce soir - là, j'ai battu mon collègue...
QQ wechat enables continuous message sending [code implementation]
53. 最大子数组和
Want to be iron man? It is said that many big men use it to get started
solr高級查詢應用---按字段分組查詢
MONGOREPLAY 的“坑”
MS COCO数据集
联调这夜,我把同事打了...
工业数字化转型中的数据治理
On the night of the joint commissioning, I beat up my colleagues
MySQL数据库(26):视图 view
Radiolisttile is displayed in row of the shutter
53. maximum subarray and
Solr advanced query application - query by field group
Why should the R & D effectiveness team of Internet companies be independent? When is independence?
YOLOX: Exceeding YOLO Series in 2021
点云全景分割学习笔记
Learning notes on panoramic segmentation of point cloud
Oracle dual 表生成多行伪记录