From 4ad67d5b10a753232478418c4855a7167dc1da99 Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Wed, 17 Apr 2024 22:07:16 +0400 Subject: [PATCH 1/4] Fix for minimal version code --- yugabyte/src/yugabyte/auto.clj | 2 +- yugabyte/src/yugabyte/core.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yugabyte/src/yugabyte/auto.clj b/yugabyte/src/yugabyte/auto.clj index 55c2e7760..7941fd004 100644 --- a/yugabyte/src/yugabyte/auto.clj +++ b/yugabyte/src/yugabyte/auto.clj @@ -318,7 +318,7 @@ (defn master-tserver-packed-columns [packed-columns-enabled] - (if packed-columns-enabled + (if (and (v/newer-or-equal? (:version test) minimal-packed-version) packed-columns-enabled) [:--ysql_enable_packed_row] []) ) diff --git a/yugabyte/src/yugabyte/core.clj b/yugabyte/src/yugabyte/core.clj index 34dc3c72e..d101cdf42 100644 --- a/yugabyte/src/yugabyte/core.clj +++ b/yugabyte/src/yugabyte/core.clj @@ -315,7 +315,7 @@ (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)) + (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)) ()) From efbf36a3be328b72c23f7229a511fa64b9e81f27 Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Wed, 17 Apr 2024 22:11:15 +0400 Subject: [PATCH 2/4] Fix for minimal version code WIP --- yugabyte/src/yugabyte/core.clj | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yugabyte/src/yugabyte/core.clj b/yugabyte/src/yugabyte/core.clj index d101cdf42..3234c202d 100644 --- a/yugabyte/src/yugabyte/core.clj +++ b/yugabyte/src/yugabyte/core.clj @@ -20,7 +20,7 @@ [yugabyte.set :as set] [yugabyte.utils :as utils] [yugabyte.utils :refer :all] - [version-clj.core :as v] + [version-clj.core :as v] [yugabyte.ycql.bank] [yugabyte.ycql.bank-improved] [yugabyte.ycql.counter] @@ -316,9 +316,8 @@ "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))] - (assoc opts :yb-packed-columns-enabled packed-columns-enabled :yb-colocated colocated)) - ()) + 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." From 020bfa1af835c0dba5c870d22430906d4aeca056 Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Wed, 17 Apr 2024 22:15:15 +0400 Subject: [PATCH 3/4] Fix for minimal version code WIP --- yugabyte/src/yugabyte/auto.clj | 2 ++ yugabyte/src/yugabyte/core.clj | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yugabyte/src/yugabyte/auto.clj b/yugabyte/src/yugabyte/auto.clj index 7941fd004..f219314d0 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 diff --git a/yugabyte/src/yugabyte/core.clj b/yugabyte/src/yugabyte/core.clj index 3234c202d..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" From 8ecb61c96619c050ee7243f6399f3e3859dac36c Mon Sep 17 00:00:00 2001 From: Dmitry Sherstobitov Date: Wed, 17 Apr 2024 23:03:01 +0400 Subject: [PATCH 4/4] Fixed null version --- yugabyte/src/yugabyte/auto.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yugabyte/src/yugabyte/auto.clj b/yugabyte/src/yugabyte/auto.clj index f219314d0..eabd5f5be 100644 --- a/yugabyte/src/yugabyte/auto.clj +++ b/yugabyte/src/yugabyte/auto.clj @@ -319,8 +319,8 @@ ]) (defn master-tserver-packed-columns - [packed-columns-enabled] - (if (and (v/newer-or-equal? (:version test) minimal-packed-version) packed-columns-enabled) + [test] + (if (and (v/newer-or-equal? (:version test) minimal-packed-version) (:yb-packed-columns-enabled test)) [:--ysql_enable_packed_row] []) ) @@ -480,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) ))) @@ -501,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)