Comments (11)
mongodb在4.0中对事务操作的namesapce是admin.$cmd,之前我们统一过滤掉admin库,这个的确是bug,目前没有对4.0进行事务上的支持。
这个功能有点复杂,对目前架构改动较大,我们会排期进行开发,在1.6版本发行出来。
from mongoshake.
现在写的mongo的Session应该还没有事务吧,我现在想先在写回数据库时把Object["applyOps"]数组拆分,根据op依次进行对应的操作,但是我又遇到类型转换的问题了,你还记得这个Object["applyOps"]是什么类型么,或者golang在断言的时候有什么办法能快速知道是什么类型
from mongoshake.
你这个oplog对应的操作不就是事务吗?
这个是bson.M,类型是interface{},断言是嵌套bson.M。golang的反射可以查看具体类型。
from mongoshake.
写回是什么意思?在目的库上自己进行拆分吗?你是想修改源码,对于事务操作自己拆分?
from mongoshake.
恩是的,目前连接mongo的客户端没有类似Session.beginTransaction( )这种事务支持吧?
from mongoshake.
事务是采用的applyOps方法进行操作的,你也可以直接采用用applyOps进行写入,不过会有写放大的问题,极端情况下会有问题。
from mongoshake.
能举个例子吗
from mongoshake.
用applyOps执行的oplog会包裹一层applyOps,相当于嵌套两层,执行多次就会嵌套多层。那么如果内层oplog已经达到上限,则加上外层的applyOps将会可能超过16MB的上限
from mongoshake.
比如事务里再用applyOps操作么,
另外用applyOps操作是否可以直接用你的CommandWriter.applyOps()
from mongoshake.
- 比如来回传递的情况,或者有链状传递,a->b->c->d,那么每传递一次都会放大一次
- 可以。singleWriter和batchWriter中应该都有的
from mongoshake.
这条issue将会被关闭,关于事务的疑问请关注 ISSUE89
from mongoshake.
Related Issues (20)
- mongoshake 源副本集群存在延迟应用节点,后台报错
- 貌似用户迁移不了? HOT 1
- Using MongoShake with MongoDB ReplicaSet on Kubernetes.
- mongoshake使用all 模式完成全量同步,开始增量同步时报错进程自动退出
- 使用all模式同步时,日志中出现run splitVector failed[cannot Decode to nil value], give up parallel fetching
- 怎么彻底停止monghShake防止hypervisor重启。 HOT 1
- 全量同步完成后,写入一个非法的checkpoint[9223372036854775807[2147483647, 4294967295]] HOT 1
- 能否支持arm架构 HOT 2
- mongoshake同步使用all模式导致目标端主库服务器oom ,mongodb进程被kill
- 是否支持同时从多个源向目标数据库同步? HOT 1
- filter过滤collection不生效 HOT 1
- can i use this tool to sync incr ops from replset mongodb(as src) to standalone mongodb(as dst)?
- 关于权限问题
- mac m1 无法启动 ./collector.linux -conf=collector.conf
- Bad checksum?
- crash
- mongo-shake支持同步kafka显示修改数据的整条数据吗?目前是只同步修改了的字段的前后信息
- mongoshake mongodb版本V5.0 同步到kafka一直提示There has no oplog collection in mongo db server,mogodb已开启oplog HOT 2
- tps加入配置
- 全量之后没有增量同步
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongoshake.