diff --git a/changelog/20.0/20.0.0/summary.md b/changelog/20.0/20.0.0/summary.md
index f1280ba7e76..b30ec93d400 100644
--- a/changelog/20.0/20.0.0/summary.md
+++ b/changelog/20.0/20.0.0/summary.md
@@ -7,6 +7,8 @@
- [Vindex Hints](#vindex-hints)
- [Update with Limit Support](#update-limit)
- [Update with Multi Table Support](#multi-table-update)
+ - **[Flag changes](#flag-changes)**
+ - [`pprof-http` default change](#pprof-http-default)
- **[Minor Changes](#minor-changes)**
@@ -43,6 +45,14 @@ Example: `update t1 join t2 on t1.id = t2.id join t3 on t1.col = t3.col set t1.b
More details about how it works is available in [MySQL Docs](https://dev.mysql.com/doc/refman/8.0/en/update.html)
+### Flag Changes
+
+#### `pprof-http` Default Change
+
+The `--pprof-http` flag, which was introduced in v19 with a default of `true`, has now been changed to default to `false`.
+This makes HTTP `pprof` endpoints now an *opt-in* feature, rather than opt-out.
+To continue enabling these endpoints, explicitly set `--pprof-http` when starting up Vitess components.
+
## Minor Changes
diff --git a/go/flags/endtoend/mysqlctl.txt b/go/flags/endtoend/mysqlctl.txt
index d729a44826d..044d12981d5 100644
--- a/go/flags/endtoend/mysqlctl.txt
+++ b/go/flags/endtoend/mysqlctl.txt
@@ -81,7 +81,7 @@ Flags:
--pid_file string If set, the process will write its pid to the named file, and delete it on graceful shutdown.
--pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled)
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s)
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
diff --git a/go/flags/endtoend/mysqlctld.txt b/go/flags/endtoend/mysqlctld.txt
index 1849519d4b8..0dde59e0d7d 100644
--- a/go/flags/endtoend/mysqlctld.txt
+++ b/go/flags/endtoend/mysqlctld.txt
@@ -108,7 +108,7 @@ Flags:
--pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled)
--port int port for the server
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s)
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
diff --git a/go/flags/endtoend/topo2topo.txt b/go/flags/endtoend/topo2topo.txt
index 49f24583668..c003c3584f3 100644
--- a/go/flags/endtoend/topo2topo.txt
+++ b/go/flags/endtoend/topo2topo.txt
@@ -33,7 +33,7 @@ Flags:
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
--logtostderr log to standard error instead of files
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
--stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1)
diff --git a/go/flags/endtoend/vtaclcheck.txt b/go/flags/endtoend/vtaclcheck.txt
index 29bdc63f835..8917df63c66 100644
--- a/go/flags/endtoend/vtaclcheck.txt
+++ b/go/flags/endtoend/vtaclcheck.txt
@@ -21,7 +21,7 @@ Flags:
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
--logtostderr log to standard error instead of files
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
--static-auth-file string The path of the auth_server_static JSON file to check
diff --git a/go/flags/endtoend/vtbackup.txt b/go/flags/endtoend/vtbackup.txt
index ea98ad70b88..d0c5a328052 100644
--- a/go/flags/endtoend/vtbackup.txt
+++ b/go/flags/endtoend/vtbackup.txt
@@ -182,7 +182,7 @@ Flags:
--opentsdb_uri string URI of opentsdb /api/put method
--port int port for the server
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--remote_operation_timeout duration time to wait for a remote operation (default 15s)
--restart_before_backup Perform a mysqld clean/full restart after applying binlogs, but before taking the backup. Only makes sense to work around xtrabackup bugs.
diff --git a/go/flags/endtoend/vtbench.txt b/go/flags/endtoend/vtbench.txt
index 4375f4ecdef..260451f6b03 100644
--- a/go/flags/endtoend/vtbench.txt
+++ b/go/flags/endtoend/vtbench.txt
@@ -72,7 +72,7 @@ Flags:
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--port int VTGate port
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--protocol string Client protocol, either mysql (default), grpc-vtgate, or grpc-vttablet (default "mysql")
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
diff --git a/go/flags/endtoend/vtclient.txt b/go/flags/endtoend/vtclient.txt
index daab2b5683f..57ddf892ac8 100644
--- a/go/flags/endtoend/vtclient.txt
+++ b/go/flags/endtoend/vtclient.txt
@@ -38,7 +38,7 @@ Flags:
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--parallel int DMLs only: Number of threads executing the same query in parallel. Useful for simple load testing. (default 1)
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--qps int queries per second to throttle each thread at.
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
diff --git a/go/flags/endtoend/vtcombo.txt b/go/flags/endtoend/vtcombo.txt
index 1712f2181f1..19bef034b10 100644
--- a/go/flags/endtoend/vtcombo.txt
+++ b/go/flags/endtoend/vtcombo.txt
@@ -258,7 +258,7 @@ Flags:
--pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled)
--port int port for the server
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--proto_topo vttest.TopoData vttest proto definition of the topology, encoded in compact text format. See vttest.proto for more information.
--proxy_protocol Enable HAProxy PROXY protocol on MySQL listener socket
--proxy_tablets Setting this true will make vtctld proxy the tablet status instead of redirecting to them
diff --git a/go/flags/endtoend/vtctlclient.txt b/go/flags/endtoend/vtctlclient.txt
index 61185dec18b..3c9c0a3cbb0 100644
--- a/go/flags/endtoend/vtctlclient.txt
+++ b/go/flags/endtoend/vtctlclient.txt
@@ -30,7 +30,7 @@ Usage of vtctlclient:
--logbuflevel int Buffer log messages logged at this level or lower (-1 means don't buffer; 0 means buffer INFO only; ...). Has limited applicability on non-prod platforms.
--logtostderr log to standard error instead of files
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
--server string server to use for connection
diff --git a/go/flags/endtoend/vtctld.txt b/go/flags/endtoend/vtctld.txt
index 32102ed8e4f..62d819fb759 100644
--- a/go/flags/endtoend/vtctld.txt
+++ b/go/flags/endtoend/vtctld.txt
@@ -103,7 +103,7 @@ Flags:
--pid_file string If set, the process will write its pid to the named file, and delete it on graceful shutdown.
--port int port for the server
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--proxy_tablets Setting this true will make vtctld proxy the tablet status instead of redirecting to them
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--remote_operation_timeout duration time to wait for a remote operation (default 15s)
diff --git a/go/flags/endtoend/vtexplain.txt b/go/flags/endtoend/vtexplain.txt
index bdbe1da8768..fdd289e63c7 100644
--- a/go/flags/endtoend/vtexplain.txt
+++ b/go/flags/endtoend/vtexplain.txt
@@ -64,7 +64,7 @@ Flags:
--output-mode string Output in human-friendly text or json (default "text")
--planner-version string Sets the default planner to use. Valid values are: Gen4, Gen4Greedy, Gen4Left2Right
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--replication-mode string The replication mode to simulate -- must be set to either ROW or STATEMENT (default "ROW")
--schema string The SQL table schema
diff --git a/go/flags/endtoend/vtgate.txt b/go/flags/endtoend/vtgate.txt
index 7585c71be6f..bd9849cfd71 100644
--- a/go/flags/endtoend/vtgate.txt
+++ b/go/flags/endtoend/vtgate.txt
@@ -165,7 +165,7 @@ Flags:
--planner-version string Sets the default planner to use when the session has not changed it. Valid values are: Gen4, Gen4Greedy, Gen4Left2Right
--port int port for the server
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--proxy_protocol Enable HAProxy PROXY protocol on MySQL listener socket
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--query-timeout int Sets the default query timeout (in ms). Can be overridden by session variable (query_timeout) or comment directive (QUERY_TIMEOUT_MS)
diff --git a/go/flags/endtoend/vtgateclienttest.txt b/go/flags/endtoend/vtgateclienttest.txt
index 61146b17ffd..e7d8fc5e177 100644
--- a/go/flags/endtoend/vtgateclienttest.txt
+++ b/go/flags/endtoend/vtgateclienttest.txt
@@ -58,7 +58,7 @@ Flags:
--pid_file string If set, the process will write its pid to the named file, and delete it on graceful shutdown.
--port int port for the server
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
--service_map strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice
diff --git a/go/flags/endtoend/vtorc.txt b/go/flags/endtoend/vtorc.txt
index 116c815f09f..8073323ec1c 100644
--- a/go/flags/endtoend/vtorc.txt
+++ b/go/flags/endtoend/vtorc.txt
@@ -61,7 +61,7 @@ Flags:
--pid_file string If set, the process will write its pid to the named file, and delete it on graceful shutdown.
--port int port for the server
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--prevent-cross-cell-failover Prevent VTOrc from promoting a primary in a different cell than the current primary in case of a failover
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--reasonable-replication-lag duration Maximum replication lag on replicas which is deemed to be acceptable (default 10s)
diff --git a/go/flags/endtoend/vttablet.txt b/go/flags/endtoend/vttablet.txt
index f0e69db12fc..ac25179db9b 100644
--- a/go/flags/endtoend/vttablet.txt
+++ b/go/flags/endtoend/vttablet.txt
@@ -256,7 +256,7 @@ Flags:
--pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled)
--port int port for the server
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--pt-osc-path string override default pt-online-schema-change binary full path
--publish_retry_interval duration how long vttablet waits to retry publishing the tablet record (default 30s)
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
diff --git a/go/flags/endtoend/vttestserver.txt b/go/flags/endtoend/vttestserver.txt
index abcec6269f1..d3af635e353 100644
--- a/go/flags/endtoend/vttestserver.txt
+++ b/go/flags/endtoend/vttestserver.txt
@@ -101,7 +101,7 @@ Flags:
--pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled)
--port int Port to use for vtcombo. If this is 0, a random port will be chosen.
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--proto_topo string Define the fake cluster topology as a compact text format encoded vttest proto. See vttest.proto for more information.
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--queryserver-config-transaction-timeout float query server transaction timeout (in seconds), a transaction will be killed if it takes longer than this value
diff --git a/go/flags/endtoend/zkctl.txt b/go/flags/endtoend/zkctl.txt
index 18c47d7c2d2..b89528766d8 100644
--- a/go/flags/endtoend/zkctl.txt
+++ b/go/flags/endtoend/zkctl.txt
@@ -28,7 +28,7 @@ Flags:
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
--logtostderr log to standard error instead of files
--pprof strings enable profiling
- --pprof-http enable pprof http endpoints (default true)
+ --pprof-http enable pprof http endpoints
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1)
--v Level log level for V logs
diff --git a/go/vt/servenv/http.go b/go/vt/servenv/http.go
index 57cf19673ad..c4b14e9b4e6 100644
--- a/go/vt/servenv/http.go
+++ b/go/vt/servenv/http.go
@@ -22,9 +22,6 @@ import (
"net/http"
"net/http/pprof"
- "github.com/spf13/pflag"
-
- "vitess.io/vitess/go/vt/log"
"vitess.io/vitess/go/vt/servenv/internal/mux"
)
@@ -53,10 +50,6 @@ func HTTPRegisterProfile() {
return
}
- if !pflag.Lookup("pprof-http").Changed {
- log.Warning("Beginning in v20, pprof-http will default to `false`; to continue enabling pprof endpoints, please manually set this flag before upgrading.")
- }
-
HTTPHandleFunc("/debug/pprof/", pprof.Index)
HTTPHandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
HTTPHandleFunc("/debug/pprof/profile", pprof.Profile)
diff --git a/go/vt/servenv/pprof.go b/go/vt/servenv/pprof.go
index 66d2dd4ed22..957c0504c00 100644
--- a/go/vt/servenv/pprof.go
+++ b/go/vt/servenv/pprof.go
@@ -35,7 +35,7 @@ import (
var (
pprofFlag []string
- httpPprof = true
+ httpPprof bool
)
type profmode string