Upgrade to v1.10.2
Upgrading to the current release
Also follow the v1.11 upgrade checklist, including its current patch checks, required source metadata setting, and native client rebuild.
The v1.10.1 and v1.10.2 patch releases correct replication safety, configuration validation, dump recovery, API authentication, and protocol-wide rate limiting. Review these actions before replacing a running node.
Before You Upgrade
Set an administrative token
Set api.admin_token before exposing the TCP or HTTP listener beyond loopback. A token is required when TCP uses a non-loopback address without a Unix socket, or when HTTP is enabled on a non-loopback address. A Unix socket only exempts the TCP listener.
Prefer MYGRAM_API_ADMIN_TOKEN in production. The variable is applied even when the configuration has no api block. Generate a high-entropy value and keep it out of the configuration file and shell history:
openssl rand -hex 32TCP clients must send AUTH <token> on the same connection before an administrative command. Administrative HTTP requests use Authorization: Bearer <token>. TCP does not encrypt the token, so use it only on a trusted or encrypted network. See the protocol reference and HTTP API guide for request details.
Validate the network and source configuration
The configuration parser rejects these combinations:
- a public TCP or enabled HTTP listener without
api.admin_token - a non-loopback listener with an open
0.0.0.0/0or::/0allowlist - CORS enabled without
cors_allow_origin - MySQL TLS with certificate verification enabled but no CA
- a MySQL source without GTID support or with a missing
mysql.user
Validate the exact production file before rollout:
mygramdb -t /etc/mygramdb/config.yamlMygramDB v1.10.2 supports MySQL 8.4/9.7 and MariaDB 10.11+/11.x/12.x; MySQL 26.x is supported from v1.12. Use GTID replication with binlog_format=ROW and binlog_row_image=FULL.
Check settings that now refuse startup
Update these configurations before restarting:
| Setting | Requirement |
|---|---|
dump.load_on_startup: true | Needs replication.start_from: "snapshot". latest and gtid=... are refused because they could skip binlog changes between the dump GTID and the configured position. |
cache.ttl_seconds, cache.eviction_batch_size, cache.invalidation.batch_size, cache.invalidation.max_delay_ms | Must not exceed 2147483647. |
required_filters values of type datetime, date, or timestamp | No trailing Z, numeric offset, or other suffix. Use epoch seconds, or an ISO date/time in the offset set by mysql.datetime_timezone. |
required_filters values of type time | Must fit -838:59:59 through 838:59:59. |
Filter type float | Not accepted. FLOAT columns used as a primary key, text source, or filter are refused when replication starts. |
OPTIMIZE | Needs roughly 2.1 times the index memory free, and refuses to start when that space is unavailable. |
Check environment overrides
The startup path applies MYGRAM_MYSQL_HOST, MYGRAM_MYSQL_PORT, MYGRAM_MYSQL_USER, MYGRAM_MYSQL_PASSWORD, and MYGRAM_MYSQL_DATABASE even when the mysql block is absent. MYGRAM_MYSQL_PORT must be an integer from 1 through 65535. MYGRAM_API_ADMIN_TOKEN likewise applies without an api block. An empty environment value is treated as unset and falls through to the file or built-in default.
Update Docker deployments
The supplied Compose stack publishes the TCP and HTTP ports on 127.0.0.1. Reaching the container from another host requires an explicit host-side port mapping.
Regenerate .env from the current environment template, then review these values:
| Variable | Requirement |
|---|---|
API_ADMIN_TOKEN | Required. The placeholder value is rejected. |
MYSQL_PASSWORD, MYSQL_ROOT_PASSWORD | Must not keep the template placeholder. |
API_CONTAINER_BIND, API_HTTP_CONTAINER_BIND | Set the in-container listeners. Compose does not use API_BIND or API_HTTP_BIND for them. |
NETWORK_ALLOW_CIDRS | Must include the Docker bridge address that MygramDB sees, not only the address the host-side client uses. |
Keep host ports on loopback unless remote access is deliberate. The Docker deployment guide has a complete example.
Remove runtime MySQL endpoint changes
mysql.host and mysql.port are startup-only. SET mysql.host=... and SET mysql.port=... return an immutable-variable error. Change the configuration and restart MygramDB instead.
Automatic reconnects stay on the configured endpoint and reject a changed source-server UUID. Remove failover automation that expected to redirect a running process with SET.
Account for shared rate limiting
TCP and HTTP now use one token bucket per client address. A client using both protocols no longer receives a separate burst from each one. If the previous combined rate was intentional, raise api.rate_limiting.capacity and api.rate_limiting.refill_rate before rollout. Runtime SET api.rate_limiting.* updates the shared limiter.
Reset query-cache expectations
Cache keys use a new serialization prefix. The query cache starts cold after the upgrade, so expect cache misses while entries warm again.
Review fail-closed replication
Replication now stops when it cannot apply or prove harmless a binlog event. This includes transaction compression, anonymous transactions when gtid_mode is not ON, LOAD DATA INFILE on a replicated table, partial JSON row images, unsupported MariaDB compressed binlog events, and source-declared binlog gaps. This event-level rule is separate from MariaDB COMPRESSED column payloads, which v1.10.2 decodes. If one of these events affected a deployment before the upgrade, fix the source setting and run SYNC for every replicated table; changing the setting alone does not repair an already divergent index.
Dumps and Startup Recovery
Existing dump compatibility
The v1.10.0 guidance that treated old dumps without a source UUID as unusable was wrong, and v1.10.1 corrects it. Dumps written by v1.5.4 and later restore. The reader also recognizes the zero header_size that older writers emitted through v1.5.3. Dumps written by v1.3.2 or earlier remain unreadable, because their posting lists use a byte order that cannot be told apart from the current one. A dump with no recorded source UUID is treated as source-unknown. A recorded UUID that differs from the running source is still rejected.
Dump compatibility checks use the qualified table identity <database>.<table>. If multiple databases contain the same table name, inspect the index after upgrading and rebuild with SYNC if an older restore selected the wrong table.
Startup dump loading
dump.load_on_startup tries dump.dir/default_filename before an initial MySQL snapshot. The dump's host, port, database, source UUID, GTID, and table configuration are checked against the configured source. A read, integrity, or identity failure logs a fallback and starts from a MySQL snapshot. Set replication.start_from: "snapshot" whenever this option is enabled.
DUMP SAVE --with-stats is no longer accepted. DUMP SAVE [path] remains available, but DUMP SAVE . is refused. The current writer refuses oversized primary keys, filter values, and text fields, so a dump whose DUMP STATUS is COMPLETED can pass the restore limits. The immediate OK DUMP_STARTED reply only confirms that saving began. Dumps written by v1.10.1 load unchanged.
After upgrading and synchronizing, create and verify a new dump before relying on dump-based recovery. See Snapshot Commands for restore limits and the operational sequence.
Replication Recovery
An undecodable binlog event stops replication with error code 2017. A TABLE_MAP column type this build cannot size stops even for an unconfigured table, because row widths must be decoded before the table can be ignored. The event remains at the last applied GTID, so reconnecting alone meets it again. Missing or malformed optional metadata on a monitored table also stops with 2017; set binlog_row_metadata=FULL on the source before recovery. Run SYNC for the highest-priority table first, then run it for every other replicated table, one at a time. See the SYNC recovery procedure.
ALTER TABLE ... RENAME TO ... that renames a table onto a configured name now stops replication with a renamed-table diagnostic. Resolve the schema change and rebuild the affected table before resuming normal writes.
Rollout Checklist
- Set a high-entropy admin token and update every administrative client.
- Validate the production configuration with
mygramdb -t. - Confirm a supported MySQL/MariaDB version, GTID,
ROWbinlogging, andFULLrow images. - Check temporal required filters, rejected
FLOATroles, dump startup settings, and cache bounds. - Apply environment overrides and regenerate Docker files, including the root password.
- Remove runtime MySQL endpoint changes and
DUMP SAVE --with-statscalls. - Check old dump table identities, verify a current dump, and keep a rollback-compatible copy.
- Recalculate the shared TCP/HTTP rate budget.
- After restart, wait for readiness, run search and administrative smoke tests, and confirm replication lag advances.
Read the v1.10.1 release notes and v1.10.2 release notes for the complete change lists.