Question about overridden MySQL defaults
Hi MOCO team! Thanks for the great operator 🙌
I'm testing MOCO and ran into some surprising defaults:
- interactive MySQL sessions (
mysql -umoco-admin -pinmysqldcontainer) start withautocommit=0 transaction_isolation=READ-COMMITTEDlock_wait_timeout=60disabled_storage_engines=MyISAM(I guess because the operator uses the clone plugin, which doesn't work withMyISAM)max_sp_recursion_depth=20- plus others here
While watching replication from outside the cluster, I didn't see new rows in a hot table, even though SHOW REPLICA STATUS said it was caught up. This non-default behavior made me second-guess replication health, whether writes were happening on the source, and even consider a potential bug in the MySQL CLI - until I realized the session was stuck due to autocommit=0; after SET autocommit=1, the new rows appeared. 😅
Could you share the rationale for these overrides? Would you consider making MOCO's defaults less opinionated, keeping only what's needed for the operator/replication, while leaving tuning of other parameters to the users?
Thanks again for the awesome operator! Eager to hear your thoughts!
@elderapo Thanks a lot for the detailed report and for pointing this out. You're right, several of these settings indeed differ from MySQL’s defaults.
These values originally came from internal configurations we used in our own environments, and some of them remained in MOCO’s default MySQL configuration as a result.
Some of these parameters are also a bit outdated, and we agree that a few can be safely aligned with MySQL’s defaults. We plan to gradually review and clean up these settings to make them more reasonable.
For parameters that may cause significant behavioral differences (such as autocommit) we’ll first make sure the current behavior is clearly documented as part of MOCO’s specification, before considering any potential changes in the future.
Thanks again for catching this and sharing your experience!