From c765a618245bedc4b3a1ff5d598cf80acb3b8278 Mon Sep 17 00:00:00 2001 From: Liran BG Date: Thu, 25 Jul 2024 21:07:20 +0300 Subject: [PATCH] [MLRun] Reduce retention binlog to 1d (#1033) --- stable/mlrun/Chart.yaml | 2 +- stable/mlrun/templates/db-configmap.yaml | 3 ++- stable/mlrun/values.yaml | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/stable/mlrun/Chart.yaml b/stable/mlrun/Chart.yaml index dc714997a..bb7a00844 100644 --- a/stable/mlrun/Chart.yaml +++ b/stable/mlrun/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: mlrun -version: 0.9.26 +version: 0.9.27 appVersion: 1.6.4 description: Machine Learning automation and tracking sources: diff --git a/stable/mlrun/templates/db-configmap.yaml b/stable/mlrun/templates/db-configmap.yaml index 124fdc67d..b559de51a 100644 --- a/stable/mlrun/templates/db-configmap.yaml +++ b/stable/mlrun/templates/db-configmap.yaml @@ -43,12 +43,13 @@ data: INIT_SCRIPT="/etc/config/mysql/init-scripts/enable-root-remote-access.sql" echo "Starting MySQL ..." - + # TODO: review the innodb flags, they might not be needed anymore mysqld \ --user={{- include "mlrun.db.DBRunUser" . }} \ --sql_mode="" \ --init-file=$INIT_SCRIPT \ + --binlog-expire-logs-seconds={{- .Values.db.dbConfiguration.binlogExpireLogsSeconds }} \ --max-connections={{- .Values.db.dbConfiguration.maxConnections }} \ --innodb-adaptive-hash-index={{- .Values.db.dbConfiguration.innodb.adaptiveHashIndex }} \ --innodb-read-io-threads={{- .Values.db.dbConfiguration.innodb.readIOThreads }} \ diff --git a/stable/mlrun/values.yaml b/stable/mlrun/values.yaml index ac6c1adad..ef5d1e299 100644 --- a/stable/mlrun/values.yaml +++ b/stable/mlrun/values.yaml @@ -494,6 +494,12 @@ db: # SUPER is a MySQL privilege that grants admin rights to the user. maxConnections: 512 + # set to 1 day + # https://dev.mysql.com/doc/refman/8.4/en/replication-options-binary-log.html#sysvar_binlog_expire_logs_seconds + # binlogs are useful for replication, backup, and point-in-time recovery + # we dont use mysql replication, so we can set it to 1 day + binlogExpireLogsSeconds: 86400 + innodb: # refer to https://github.com/v3io/helm-charts/pull/674 adaptiveHashIndex: 0