Skip to content

Commit

Permalink
Packed version fix (#116)
Browse files Browse the repository at this point in the history
* Fix for minimal version code

* Fix for minimal version code WIP

* Fix for minimal version code WIP

* Fixed null version
  • Loading branch information
qvad authored Apr 17, 2024
1 parent 2ff240c commit 1f327d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
10 changes: 6 additions & 4 deletions yugabyte/src/yugabyte/auto.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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]
[])
)
Expand Down Expand Up @@ -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)
)))
Expand All @@ -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)
Expand Down
9 changes: 3 additions & 6 deletions yugabyte/src/yugabyte/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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"
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit 1f327d4

Please sign in to comment.