-
Notifications
You must be signed in to change notification settings - Fork 1k
Comparing changes
Open a pull request
base repository: go-mysql-org/go-mysql
base: v1.9.1
head repository: go-mysql-org/go-mysql
compare: v1.10.0
- 19 commits
- 37 files changed
- 7 contributors
Commits on Sep 26, 2024
-
Signed-off-by: lance6716 <lance6716@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a9f9c23 - Browse repository at this point
Copy the full SHA a9f9c23View commit details
Commits on Oct 20, 2024
-
Ensure ACKs are sent after backup (#921)
* This commit addresses an issue where acknowledgments (ACKs) were sometimes sent to the master before binlog events were fully written and fsynced to disk during backup operations. Sending ACKs prematurely in semi-synchronous replication could lead to data loss if the replica fails after sending the ACK but before persisting the event. Key changes: - Introduced an `EventHandler` interface with a `HandleEvent` method for processing binlog events. This allows custom event handling logic to be injected into the replication stream. - Added an `eventHandler` field to `BinlogSyncer` and provided a `SetEventHandler` method to assign an event handler. This enables `BinlogSyncer` to delegate event processing to the assigned handler. - Implemented `BackupEventHandler` which writes binlog events to disk and ensures that each event is fsynced before returning. This ensures data durability before ACKs are sent. - Modified the `onStream` method in `BinlogSyncer` to separate event parsing (`parseEvent`) from event handling and ACK sending (`handleEventAndACK`). This adheres to the single-responsibility principle and makes the code cleaner. - Moved state updates (e.g., updating `b.nextPos`) and GTID set handling from `parseEvent` to `handleEventAndACK` to avoid side effects during parsing. - Ensured that ACKs are sent only after the event has been fully processed and fsynced by sending the ACK in `handleEventAndACK` after event handling. * Refactor event handling by replacing SyncMode and EventHandleMode with SynchronousEventHandler. Simplify the event processing in BinlogSyncerConfig by introducing SynchronousEventHandler for synchronous event handling. Update StartBackup, StartBackupWithHandler, and associated tests to reflect these changes. * Add some comments and remember to remove SetEventHandler and the eventHandler attribute * Remove the timeout for synchronous backup, revert the timeout move to return the behavior to 30 days _between_ events, restore some comments, use struct instead of bool as recommended, add a note about SynchronousEventHandler and the parseEvent return values * Make sure to assign the timeout on the syncer so the backup doesn't fail * Make sure to add NewBackupHandler in order to expose the otherwise private handler outside the package --------- Co-authored-by: Dylan Terry <dterry@dropbox.com>
Configuration menu - View commit details
-
Copy full SHA for c435689 - Browse repository at this point
Copy the full SHA c435689View commit details
Commits on Oct 24, 2024
-
client: Fix timeout reset during TLS handshake (#925)
This commit fixes `(*client.Conn).writeAuthHandshake()` to use `packet.NewConnWithTimeout` instead of `packet.NewBufferedConn` when recreating the packet connection after switching TLS on. This preserves the connection read/write timeout settings which would otherwise be reset to zero. Since this code executes after some reads and writes have already taken place, and the packet connection code only sets a deadline when the timeout values are nonzero, the result was that previously when connecting using TLS and with a read and/or write timeout set, the connection would inevitably fail just one timeout-duration after being opened. This use of `packet.NewBufferedConn` appears to be the only place in the `client` package where a packet connection was recreated without the timeout configuration being plumbed through.
Configuration menu - View commit details
-
Copy full SHA for ff1dab4 - Browse repository at this point
Copy the full SHA ff1dab4View commit details
Commits on Oct 26, 2024
-
Makefile: allow for gotip (#928)
This allows `make GO=gotip build` to work.
Configuration menu - View commit details
-
Copy full SHA for 51292e4 - Browse repository at this point
Copy the full SHA 51292e4View commit details -
replication: Make ServerVersion a proper string (#930)
The ServerVersion is a slice of 50 bytes. If the ServerVersion was "9.1.0" then the rest of they bytes would be 0x0. This caused the printout of the FormatDescriptionEvent in go-mysqlbinlog to look weird. Before: ``` === FormatDescriptionEvent === Date: 2024-10-24 14:42:04 Log position: 127 Event size: 123 Version: 4 Server version: 9.1.0^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ Checksum algorithm: 1 ``` After: ``` === FormatDescriptionEvent === Date: 2024-10-24 14:42:04 Log position: 127 Event size: 123 Version: 4 Server version: 9.1.0 Checksum algorithm: 1 ``` Co-authored-by: lance6716 <lance6716@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 22158ba - Browse repository at this point
Copy the full SHA 22158baView commit details
Commits on Oct 27, 2024
-
dump: Support newer mysqldump versions (#932)
Old mysqldump used `CHANGE MASTER TO ...` and newer versions use `CHANGE REPLICATION SOURCE ...`. Co-authored-by: lance6716 <lance6716@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for cadcdcc - Browse repository at this point
Copy the full SHA cadcdccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 661b04b - Browse repository at this point
Copy the full SHA 661b04bView commit details
Commits on Oct 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 03f4d7c - Browse repository at this point
Copy the full SHA 03f4d7cView commit details -
dump: use --source-data based on version (#933)
* dump: use --source-data based on version * Fix issue found by linter --------- Co-authored-by: lance6716 <lance6716@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5ad36fa - Browse repository at this point
Copy the full SHA 5ad36faView commit details -
server: Improve example (#936)
* server: Improve example 1. Use the example from the `README.md` and turn it into a `go-mysqlserver` binary that users can run. 2. Add more logging to make it easier to understand what it is doing. This is done both in `go-mysqlserver` as well as the `EmptyHandler` 3. Remove the `server/example` as we already have a example now. 4. Support the minimal set of queries that MySQL Shell `mysqlsh` needs to be able to connect. (tested with MySQL Shell 9.1.0) 5. Change the default version from 5.7.0 to 8.0.11 (first 8.0 GA version) * Update server/command.go Co-authored-by: lance6716 <lance6716@gmail.com> * Update based on review --------- Co-authored-by: lance6716 <lance6716@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5acb569 - Browse repository at this point
Copy the full SHA 5acb569View commit details
Commits on Nov 8, 2024
-
go-mysqldump: Add option to skip binlog position (#941)
When running against MariaDB 11.4 without binlogs enabled: - `mysqldump` 9.1.0 fails to dump when called with `--source-data` due to the `SHOW BINARY LOG STATUS` not being supported by MariaDB. - `mariadb-dump` 11.4 fails to dump when called with `--master-data` due to binlogs not being enabled. Other situations where this can be useful: - Permission issues
Configuration menu - View commit details
-
Copy full SHA for 867d4cc - Browse repository at this point
Copy the full SHA 867d4ccView commit details
Commits on Nov 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5b7ff06 - Browse repository at this point
Copy the full SHA 5b7ff06View commit details
Commits on Nov 11, 2024
-
dump: use mariadb-dump when available (#942)
Co-authored-by: lance6716 <lance6716@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 37a3291 - Browse repository at this point
Copy the full SHA 37a3291View commit details -
Co-authored-by: lance6716 <lance6716@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f230d5f - Browse repository at this point
Copy the full SHA f230d5fView commit details -
canal: support ipv6 address (#943)
* feat(canal): support ipv6 address * feat: use net.SplitHostPort to parse ip with ports * chore: optimze validate error message * feat(ci): complete test cases * feat(dumper): use net.SplitHostPort to parse address
Configuration menu - View commit details
-
Copy full SHA for 760b566 - Browse repository at this point
Copy the full SHA 760b566View commit details
Commits on Nov 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c7b7533 - Browse repository at this point
Copy the full SHA c7b7533View commit details
Commits on Nov 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b1f4fb3 - Browse repository at this point
Copy the full SHA b1f4fb3View commit details
Commits on Nov 20, 2024
-
replication,cmd: improve flavor handling (#946)
For `go-mysqlbinlog` and `go-canal`: return an error for invalid flavors. For `go-mysqlbinlog`: log a non-critical error if the server version has "MariaDB" in it but the flavor isn't set to "mariadb". Co-authored-by: lance6716 <lance6716@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8b76415 - Browse repository at this point
Copy the full SHA 8b76415View commit details -
* prepare a release Signed-off-by: lance6716 <lance6716@gmail.com> * --wip-- [skip ci] * done Signed-off-by: lance6716 <lance6716@gmail.com> --------- Signed-off-by: lance6716 <lance6716@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 95109e7 - Browse repository at this point
Copy the full SHA 95109e7View commit details
There are no files selected for viewing