Giter VIP home page Giter VIP logo

Comments (2)

star-brilliant avatar star-brilliant commented on July 23, 2024

模板表仅仅提供输出namespace名称和表meta信息,正则才是真正的数据映射,你可以改为配置share_.*

from dbus.

wupan-olo avatar wupan-olo commented on July 23, 2024

嗯,不管那种则正表达模式,都是为了让物理的分表能带上模版表的meta信息,后面的拓扑能正确处理。
这个tableMatchContainer存储的是 模版(table_name) -> 正则(physical_table_regex)
当执行TableMatchContainer.getInstance().getLocalTable(tableName);时
例如:
存储的是 t_a_0 -> t_a_\d+
t_b -> t_b
当前fetch的table_name = t_a_100;

public String getLocalTable(String table){
		for(Map.Entry<String, String> entry : map.entrySet()){
			if(!table.contains(entry.getKey()))
				continue;
			if(table.matches(entry.getValue())){
				return entry.getKey();
			}
		}
		return table;
	}

这样执行返回的table_name不是期望的模版表名称。结果就是直接被filter掉了。

我提交的第一个pr里面我没有仔细看到mysql-extractor的实现,后面发现其实你们已经充分考虑到了分表的增量处理,只是在上诉方法中存在一个逻辑bug

from dbus.

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.