diff --git a/yugabyte/src/yugabyte/auto.clj b/yugabyte/src/yugabyte/auto.clj index 55c2e7760..eabd5f5be 100644 --- a/yugabyte/src/yugabyte/auto.clj +++ b/yugabyte/src/yugabyte/auto.clj @@ -10,6 +10,7 @@ [jepsen.control.net :as cn] [jepsen.control.util :as cu] [jepsen.os.debian :as debian] + [version-clj.core :as v] [yugabyte.ycql.client :as ycql.client] [yugabyte.ysql.client :as ysql.client] [yugabyte.utils :as utils] @@ -24,6 +25,7 @@ (def master-log-dir (str dir "/master/logs")) (def tserver-log-dir (str dir "/tserver/logs")) (def installed-url-file (str dir "/installed-url")) +(def minimal-packed-version "2.16.4.0-b1") (def max-bump-time-ops-per-test "Upper bound on number of bump time ops per test, needed to estimate max @@ -317,8 +319,8 @@ ]) (defn master-tserver-packed-columns - [packed-columns-enabled] - (if packed-columns-enabled + [test] + (if (and (v/newer-or-equal? (:version test) minimal-packed-version) (:yb-packed-columns-enabled test)) [:--ysql_enable_packed_row] []) ) @@ -478,7 +480,7 @@ (master-tserver-experimental-tuning-flags test) (master-tserver-random-clock-skew test node) (master-tserver-wait-on-conflict-flags test) - (master-tserver-packed-columns (:yb-packed-columns-enabled test)) + (master-tserver-packed-columns test) (master-tserver-geo-partitioning-flags test node (:nodes test)) (master-api-opts (:api test) node) ))) @@ -499,7 +501,7 @@ (master-tserver-experimental-tuning-flags test) (master-tserver-random-clock-skew test node) (master-tserver-wait-on-conflict-flags test) - (master-tserver-packed-columns (:yb-packed-columns-enabled test)) + (master-tserver-packed-columns test) (master-tserver-geo-partitioning-flags test node (:nodes test)) (tserver-api-opts (:api test) node) (tserver-read-committed-flags test) diff --git a/yugabyte/src/yugabyte/core.clj b/yugabyte/src/yugabyte/core.clj index 34dc3c72e..5ff84a28d 100644 --- a/yugabyte/src/yugabyte/core.clj +++ b/yugabyte/src/yugabyte/core.clj @@ -20,7 +20,6 @@ [yugabyte.set :as set] [yugabyte.utils :as utils] [yugabyte.utils :refer :all] - [version-clj.core :as v] [yugabyte.ycql.bank] [yugabyte.ycql.bank-improved] [yugabyte.ycql.counter] @@ -41,7 +40,6 @@ (:import (jepsen.client Client))) (def version-regex #"(?<=yugabyte\-)(\d+\.\d+(\.\d+){0,2}(-b\d+)?)") -(def minimal-packed-version "2.16.4.0-b1") (defn noop-test "NOOP test, exists to validate setup/teardown phases" @@ -315,10 +313,9 @@ (defn test-3 "Final phase where we define global cluster configuration parameters" [opts] - (let [packed-columns-enabled (and (v/newer-or-equal? (:version test) minimal-packed-version) (> (rand) 0.5)) - colocated (and (not (utils/is-test-geo-partitioned? opts)) (> (rand) 0.5))] - (assoc opts :yb-packed-columns-enabled packed-columns-enabled :yb-colocated colocated)) - ()) + (let [packed-columns-enabled (> (rand) 0.5) + 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 yb-test "Constructs a yugabyte test from CLI options."