Skip to content

Commit

Permalink
Merge pull request #23797 from philip-stoev/ci-tone-down-logging
Browse files Browse the repository at this point in the history
ci: Tone down statement logging
  • Loading branch information
philip-stoev authored Dec 13, 2023
2 parents 01813a3 + 91c72d3 commit 96d1a8e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
4 changes: 2 additions & 2 deletions misc/python/materialize/mzcompose/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
# Old name of `enable_unsafe_functions`.
"enable_dangerous_functions": "true",
"enable_disk_cluster_replicas": "true",
"statement_logging_max_sample_rate": "1.0",
"statement_logging_default_sample_rate": "1.0",
"statement_logging_max_sample_rate": "0.01",
"statement_logging_default_sample_rate": "0.01",
# Following values are set based on Load Test environment to
# reduce CRDB load as we are struggling with it in CI:
"persist_next_listen_batch_retryer_clamp": "100ms",
Expand Down
23 changes: 23 additions & 0 deletions test/cluster/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -2891,3 +2891,26 @@ def workflow_test_github_23246(c: Composition, parser: WorkflowArgumentParser) -
# panicking.
c.kill("materialized")
c.up("materialized")


def workflow_statement_logging(c: Composition, parser: WorkflowArgumentParser) -> None:
"""Statement logging test needs to run with 100% logging of tests (as opposed to the default 1% )"""

c.down(destroy_volumes=True)

with c.override(
Testdrive(no_reset=True),
Materialized(),
):
c.up("materialized")

c.sql(
"""
ALTER SYSTEM SET statement_logging_max_sample_rate = 1.0;
ALTER SYSTEM SET statement_logging_default_sample_rate = 1.0;
""",
port=6877,
user="mz_system",
)

c.run("testdrive", "statement-logging/statement-logging.td")
File renamed without changes.
6 changes: 3 additions & 3 deletions test/testdrive/session.td
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ server_version 9.5.0 "Shows the PostgreSQ
server_version_num 90500 "Shows the PostgreSQL compatible server version as an integer (PostgreSQL)."
sql_safe_updates off "Prohibits SQL statements that may be overly destructive (CockroachDB)."
standard_conforming_strings on "Causes '...' strings to treat backslashes literally (PostgreSQL)."
statement_logging_default_sample_rate 1.0 "The default value of `statement_logging_sample_rate` for new sessions (Materialize)."
statement_logging_max_sample_rate 1.0 "The maximum rate at which statements may be logged. If this value is less than that of `statement_logging_sample_rate`, the latter is ignored (Materialize)."
statement_logging_sample_rate 1.0 "User-facing session variable indicating how many statement executions should be logged, subject to constraint by the system variable `statement_logging_max_sample_rate` (Materialize)."
statement_logging_default_sample_rate 0.01 "The default value of `statement_logging_sample_rate` for new sessions (Materialize)."
statement_logging_max_sample_rate 0.01 "The maximum rate at which statements may be logged. If this value is less than that of `statement_logging_sample_rate`, the latter is ignored (Materialize)."
statement_logging_sample_rate 0.01 "User-facing session variable indicating how many statement executions should be logged, subject to constraint by the system variable `statement_logging_max_sample_rate` (Materialize)."
statement_timeout "10 s" "Sets the maximum allowed duration of INSERT...SELECT, UPDATE, and DELETE operations. If this value is specified without units, it is taken as milliseconds."
TimeZone UTC "Sets the time zone for displaying and interpreting time stamps (PostgreSQL)."
transaction_isolation "strict serializable" "Sets the current transaction's isolation level (PostgreSQL)."
Expand Down

0 comments on commit 96d1a8e

Please sign in to comment.