alibaba / MongoShake

MongoShake is a universal data replication platform based on MongoDB's oplog. Redundant replication and active-active replication are two most important functions. 基于mongodb oplog的集群复制工具,可以满足迁移和同步的需求,进一步实现灾备和多活功能。
GNU General Public License v3.0
1.72k stars 441 forks source link

FilterNamespaceBlack db.collection support for transactions #849

Open garaghav7 opened 1 year ago

garaghav7 commented 1 year ago

We tested the following scenario 1) testdb.coll1 is added to FilterNamespaceBlack[] configuration 2) Created a transaction which includes testdb.coll1 and testdb.coll2 and committed the transaction 3) Noticed that testdb.coll1 is replicated on passive mongo cluster even though it was added in the blacklist.

Please confirm the above behavior. If FilterNamespaceBlack of db.collection is supported for transactions or there are any limitations around this?

Thanks

mehar commented 1 year ago

This test seems to fail as well as expected https://github.com/alibaba/MongoShake/blob/acbaf609146b0b5e4c3f1c0589659468976a68cb/collector/filter/filter_test.go#L142

garaghav7 commented 1 year ago

We noticed the commit that caused this testcase to fail is this one - https://github.com/alibaba/MongoShake/commit/3256d5db2978751af7ecef91a6c27b6ceec04947 The code that handles the namespace filter for transactions is commented. Was this intentional ?

The tag 2.7.4 which was released before this commit has the test passing. Please confirm if we can raise a PR for this?

Thanks Gayathri

mehar commented 8 months ago

Any thoughts on this from the committers?