hanchuanchuan / goInception

一个集审核、执行、备份及生成回滚语句于一身的MySQL运维工具
https://hanchuanchuan.github.io/goInception/
GNU General Public License v3.0
1.62k stars 553 forks source link

feat: add mark to transaction for OceanBase #619

Open whhe opened 11 months ago

whhe commented 11 months ago

Our team is going to open source a new version of oblogproxy, named "Binlog Service", it serves like a mysql server and support the mysql dump protocol. But there is an issue that the output of show master status from it exists a certain delay, which means we can't filter out the binlog event by the log position.

Here is my solution: add a table to mark the start and end of one transaction at the source database, the table is like below:

CREATE TABLE `$_$Inception$_$`.`transaction_mark` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mark_type` int(11) DEFAULT NULL,
  `thread_id` int(10) unsigned DEFAULT NULL,
  `log_file` varchar(40) DEFAULT NULL,
  `log_position` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
)
sonarcloud[bot] commented 10 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.5% 0.5% Duplication

sonarcloud[bot] commented 8 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.4% Duplication on New Code

See analysis details on SonarCloud