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

Added flags to control test features #108

Open
wants to merge 3 commits into
base: master-yb
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 10 additions & 0 deletions yugabyte/src/yugabyte/auto.clj
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,14 @@
:--rpc_connection_timeout_ms 1500]
[]))

(defn master-tserver-trace-sql-transactions
"Speed up recovery from partitions and crashes. Right now it looks like
these actually make the cluster slower to, or unable to, recover."
[test]
(if (:trace-sql-tx test)
[:--vmodule "transaction=2,transaction_coordinator=4,conflict_resolution=4"]
[]))

(def limits-conf
"Ulimits, in the format for /etc/security/limits.conf."
"
Expand Down Expand Up @@ -476,6 +484,7 @@
:--replication_factor (:replication-factor test)
;:--auto_create_local_transaction_tables=false
(master-tserver-experimental-tuning-flags test)
(master-tserver-trace-sql-transactions test)
(master-tserver-random-clock-skew test node)
(master-tserver-wait-on-conflict-flags test)
(master-tserver-packed-columns (:yb-packed-columns-enabled test))
Expand All @@ -497,6 +506,7 @@
:--enable_tracing
:--rpc_slow_query_threshold_ms 1000
(master-tserver-experimental-tuning-flags test)
(master-tserver-trace-sql-transactions test)
(master-tserver-random-clock-skew test node)
(master-tserver-wait-on-conflict-flags test)
(master-tserver-packed-columns (:yb-packed-columns-enabled test))
Expand Down
9 changes: 9 additions & 0 deletions yugabyte/src/yugabyte/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,15 @@
colocated (and (not (utils/is-test-geo-partitioned? opts)) (> (rand) 0.5))]
(assoc opts :yb-packed-columns-enabled packed-columns-enabled :yb-colocated colocated)))

(defn test-3
qvad marked this conversation as resolved.
Show resolved Hide resolved
"Final phase where we define global cluster configuration parameters"
[opts]
(let [packed-columns-enabled (> (rand) 0.5)
colocated (and (not (utils/is-test-geo-partitioned? opts)) (> (rand) 0.5))]
(if (:additional-features test)
(assoc opts :yb-packed-columns-enabled packed-columns-enabled
:yb-colocated colocated))))

(defn yb-test
"Constructs a yugabyte test from CLI options."
[opts]
Expand Down
6 changes: 6 additions & 0 deletions yugabyte/src/yugabyte/runner.clj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
[nil "--heartbeat-flags" "Enable heartbeat tserver tracing flags on YB"
:default false]

[nil "--additional-features" "Enable additional features like packed columns, colocated, etc."
:default true]

[nil "--clock-skew-flags" "Enable soft clock skew flags on YB"
:default true]

Expand Down Expand Up @@ -112,6 +115,9 @@
[nil "--url URL" "URL to Yugabyte tarball to install, has precedence over --version"
:default nil]

[nil "--trace-sql-tx" "Trace SQL transactions using vmodule gflag, needed for fast debug."
:default false]

[nil "--trace-cql" "If provided, logs CQL queries"
:default false]])

Expand Down
Loading