Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update apecloud-mysql binary version #129

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions addons/apecloud-mysql/config/mysql8-auditlog-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,20 @@ general_log_file=/data/mysql/log/mysqld.log
{{ end }}

## for auditlog
rds_audit_log_dir=/data/mysql/auditlog
rds_audit_log_enabled=ON
#rds_audit_log_buffer_size=8388608
#rds_audit_log_connection_policy=ALL
#rds_audit_log_event_buffer_size=2048
#rds_audit_log_flush=OFF
rds_audit_log_policy=ALL
rds_audit_log_format=PLAIN # PLAIN or JSON
#rds_audit_log_row_limit=100000
rds_audit_log_skip=OFF
rds_audit_log_statement_policy=ALL
#rds_audit_log_strategy=ASYNCHRONOUS
loose_audit_log_dir=/data/mysql/auditlog
loose_audit_log_enabled=ON
#loose_audit_log_buffer_size=8388608
#loose_audit_log_connection_policy=ALL
#loose_audit_log_event_buffer_size=2048
#loose_audit_log_flush=OFF
loose_audit_log_policy=ALL
loose_audit_log_format=PLAIN # PLAIN or JSON
#loose_audit_log_row_limit=100000
loose_audit_log_skip=OFF
loose_audit_log_statement_policy=ALL
#loose_audit_log_strategy=ASYNCHRONOUS
## TODO select which format by env when creating a cluster?
rds_audit_log_version=MYSQL_V1 # MYSQL_V1 or MYSQL_V3
loose_audit_log_version=MYSQL_V1 # MYSQL_V1 or MYSQL_V3

#innodb
innodb_doublewrite_batch_size=16
Expand Down
30 changes: 24 additions & 6 deletions addons/apecloud-mysql/config/mysql8-config-constraint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -1536,22 +1536,40 @@
windowing_use_high_precision: string & "0" | "1" | "OFF" | "ON" | *"1"

// Mysql audit log version.
rds_audit_log_version?: string & "MYSQL_V1" | "MYSQL_V3"
loose_audit_log_version?: string & "MYSQL_V1" | "MYSQL_V3"

// To select the log format that the audit log plugin uses to write its log file, set the audit_log_format system variable at server startup
rds_audit_log_format?: string & "JSON" | "PLAIN"
loose_audit_log_format?: string & "JSON" | "PLAIN"

// The option to enable or disable audit log.
rds_audit_log_enabled?: string & "0" | "1" | "OFF" | "ON" | *"OFF"
loose_audit_log_enabled?: string & "0" | "1" | "OFF" | "ON" | *"OFF"

// The policy controlling how the audit log plugin writes connection events to its log file. Supported values are 'ALL' (default), 'ERRORS' and 'NONE'.
rds_audit_log_connection_policy?: string & "ALL" | "ERRORS" | "NONE"
loose_audit_log_connection_policy?: string & "ALL" | "ERRORS" | "NONE"

// The policy controlling how the audit log plugin writes query events to its log file. Supported values are 'ALL' (default), 'UPDATES', 'UPDATES_OR_ERRORS', 'ERRORS' and 'NONE'.
rds_audit_log_statement_policy?: string & "ALL" | "UPDATES" | "NONE" | "ERRORS" | "UPDATES_OR_ERRORS"
loose_audit_log_statement_policy?: string & "ALL" | "UPDATES" | "NONE" | "ERRORS" | "UPDATES_OR_ERRORS"

// Max number of rows in each audit log file. Log records will be discarded above this number.
rds_audit_log_row_limit?: int & >=1 | *100000
audit_log_row_limit?: int & >=1 | *100000

// Mysql audit log version.
audit_log_version?: string & "MYSQL_V1" | "MYSQL_V3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not with the prefix loose_?

Copy link
Contributor Author

@sophon-zt sophon-zt Dec 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mysql engine accepts both types of parameters. In fact, it is not sure which set of parameters will be used by the user-defined template. so it retains maximum consistency with the engine.


// To select the log format that the audit log plugin uses to write its log file, set the audit_log_format system variable at server startup
audit_log_format?: string & "JSON" | "PLAIN"

// The option to enable or disable audit log.
audit_log_enabled?: string & "0" | "1" | "OFF" | "ON" | *"OFF"

// The policy controlling how the audit log plugin writes connection events to its log file. Supported values are 'ALL' (default), 'ERRORS' and 'NONE'.
audit_log_connection_policy?: string & "ALL" | "ERRORS" | "NONE"

// The policy controlling how the audit log plugin writes query events to its log file. Supported values are 'ALL' (default), 'UPDATES', 'UPDATES_OR_ERRORS', 'ERRORS' and 'NONE'.
audit_log_statement_policy?: string & "ALL" | "UPDATES" | "NONE" | "ERRORS" | "UPDATES_OR_ERRORS"

// Max number of rows in each audit log file. Log records will be discarded above this number.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated with line 1554

audit_log_row_limit?: int & >=1 | *100000

// other parameters
// reference mysql parameters
Expand Down
2 changes: 1 addition & 1 deletion addons/apecloud-mysql/templates/_names.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Define cluster version with auditlog
*/}}
{{- define "apecloud-mysql.clusterVersionAuditLog" -}}
{{- if eq (len .Values.resourceNamePrefix) 0 -}}
ac-mysql-{{ default .Chart.AppVersion .Values.clusterVersionOverride }}-auditlog
ac-mysql-{{ default .Chart.AppVersion .Values.clusterVersionOverride }}-1
{{- else -}}
{{- .Values.resourceNamePrefix -}}-{{ default .Chart.AppVersion .Values.clusterVersionOverride }}-auditlog
{{- end -}}
Expand Down
4 changes: 2 additions & 2 deletions addons/apecloud-mysql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ image:
repository: apecloud/apecloud-mysql-server
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: 8.0.30-5.beta2.20230830.g4ca1eb8.13
tag: 8.0.30-5.beta3.20231215.ge77d836.13
audit:
tag: 8.0.30-5.auditlogtest.20231121.g143b127.13
tag: 8.0.30-5.beta3.auditlog.20231221.g6ba5e2e.13

## MySQL Cluster parameters
cluster:
Expand Down
5 changes: 4 additions & 1 deletion addons/postgresql/config/pg12-config-constraint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@
synchronize_seqscans?: bool & false | true

// Sets the current transactions synchronization level.
synchronous_commit?: string & "local" | "on" | "off"
synchronous_commit?: string & "local" | "on" | "off" | "remote_write" | "remote_apply"

// Maximum number of TCP keepalive retransmits.
tcp_keepalives_count?: int & >=0 & <=2147483647
Expand Down Expand Up @@ -1033,6 +1033,9 @@
// Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.
xmloption?: string & "content" | "document"

// Sets the level of information written to the WAL. replica writes enough data to support WAL archiving and replication, including running read-only queries on a standby server. minimal removes all logging except the information required to recover from a crash or immediate shutdown. Finally, logical adds information necessary to support logical decoding
wal_level?: string & "minimal" | "replica" | "logical"

...
}

Expand Down
2 changes: 1 addition & 1 deletion addons/postgresql/config/pg12-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ standard_conforming_strings = 'True'
statement_timeout = '0'
superuser_reserved_connections = '20'
synchronize_seqscans = 'True'
synchronous_commit = 'off'
synchronous_commit = 'on'
# synchronous_standby_names=''
tcp_keepalives_count = '10'
tcp_keepalives_idle = '45s'
Expand Down
5 changes: 4 additions & 1 deletion addons/postgresql/config/pg14-config-constraint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@
synchronize_seqscans?: bool & false | true

// Sets the current transactions synchronization level.
synchronous_commit?: string & "local" | "on" | "off"
synchronous_commit?: string & "local" | "on" | "off" | "remote_write" | "remote_apply"

// Maximum number of TCP keepalive retransmits.
tcp_keepalives_count?: int & >=0 & <=2147483647
Expand Down Expand Up @@ -1108,6 +1108,9 @@
// Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.
xmloption?: string & "content" | "document"

// Sets the level of information written to the WAL. replica writes enough data to support WAL archiving and replication, including running read-only queries on a standby server. minimal removes all logging except the information required to recover from a crash or immediate shutdown. Finally, logical adds information necessary to support logical decoding
wal_level?: string & "minimal" | "replica" | "logical"

...
}

Expand Down
2 changes: 1 addition & 1 deletion addons/postgresql/config/pg14-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ standard_conforming_strings = 'True'
statement_timeout = '0'
superuser_reserved_connections = '20'
synchronize_seqscans = 'True'
synchronous_commit = 'off'
synchronous_commit = 'on'
# synchronous_standby_names=''
tcp_keepalives_count = '10'
tcp_keepalives_idle = '45s'
Expand Down