Disable the ChangeLog table binlog
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 13.6k
- Forks
- 1.4k
- Ø Merge
- 2 Std. 31 Min.
- Gemergte PRs (30 T.)
- 4
Beschreibung
I have tested this on my staging server. Some background about the setup:
- Total MySQL Data Disk size =
1000GB - Space consumed =
700+ GB - Large file =
table_x.idbfile - Binlog files are stored in the same Location where my data files are there.
- GTID enabled
- row based replication.
Then I started migrating using the below command.
gh-ost \
--max-load=Threads_running=25 \
--critical-load=Threads_running=1000 \
--chunk-size=10000 \
--throttle-control-replicas="replica-ip-address" \
--max-lag-millis=50000 \
--user="bhuvi" \
--password="bhuvi@123" \
--host=replica-ip-address \
--database="mydatabase" \
--table="huge_table_nmae" \
--verbose \
--alter="engine=innodb" \
--switch-to-rbr \
--cut-over=default \
--exact-rowcount \
--concurrent-rowcount \
--default-retries=120 \
--panic-flag-file=/tmp/ghost.panic.flag \
--skip-foreign-key-checks \
--execute
within 3 hrs, the binlog files generated around 350+ files and the total size of all the binlog files is 150+ GB.
Now my data disk reached 100%.
Im just thinking in some rare cases, people don't have enough disk and no way to increase, it'll not suit. So is there any way that we can ignore the change log table or reduce the log (every X seconds log will go to this table).
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem gh-ost-Migrationsbefehl und dem hier beschriebenen zeilenbasierten MySQL-Replikations- und binlog-Verhalten. Ermittle, ob die changelog-Tabelle deaktiviert oder ihre Schreibfrequenz reduziert werden kann, ohne die Migration zu beeinträchtigen, und überprüfe anschließend die resultierende binlog- und Festplattennutzung in einer vergleichbaren Staging-Umgebung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- go, mysql
- Bereich
- databases
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100