Skip to content

Commit 81fd236

Browse files
craig[bot]mw5h
andcommitted
Merge #155536
155536: vecindex: enable vector indexing by default r=mw5h a=mw5h While vector indexing was in tech preview, it was disabled by default. Now that we are transitioning this feature to general availability, it needs to be enabled by default. Epic: CRDB-52151 Release note (sql change): Vector indexing is now enabled by default. Co-authored-by: Matt White <matt.white@cockroachlabs.com>
2 parents 94060ac + 11f6cdd commit 81fd236

File tree

42 files changed

+23
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+23
-103
lines changed

docs/generated/settings/settings-for-tenants.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ feature.infer_rbr_region_col_using_constraint.enabled boolean false set to true
7777
feature.restore.enabled boolean true set to true to enable restore, false to disable; default is true application
7878
feature.schema_change.enabled boolean true set to true to enable schema changes, false to disable; default is true application
7979
feature.stats.enabled boolean true set to true to enable CREATE STATISTICS/ANALYZE, false to disable; default is true application
80-
feature.vector_index.enabled boolean false set to true to enable vector indexes, false to disable; default is false application
80+
feature.vector_index.enabled boolean true set to true to enable vector indexes, false to disable; default is true application
8181
jobs.retention_time duration 336h0m0s the amount of time for which records for completed jobs are retained application
8282
kv.bulk_sst.target_size byte size 16 MiB target size for SSTs emitted from export requests; export requests (i.e. BACKUP) may buffer up to the sum of kv.bulk_sst.target_size and kv.bulk_sst.max_allowed_overage in memory system-visible
8383
kv.closed_timestamp.follower_reads.enabled (alias: kv.closed_timestamp.follower_reads_enabled) boolean true allow (all) replicas to serve consistent historical reads based on closed timestamp information system-visible

docs/generated/settings/settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<tr><td><div id="setting-feature-restore-enabled" class="anchored"><code>feature.restore.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable restore, false to disable; default is true</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
8383
<tr><td><div id="setting-feature-schema-change-enabled" class="anchored"><code>feature.schema_change.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable schema changes, false to disable; default is true</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
8484
<tr><td><div id="setting-feature-stats-enabled" class="anchored"><code>feature.stats.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable CREATE STATISTICS/ANALYZE, false to disable; default is true</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
85-
<tr><td><div id="setting-feature-vector-index-enabled" class="anchored"><code>feature.vector_index.enabled</code></div></td><td>boolean</td><td><code>false</code></td><td>set to true to enable vector indexes, false to disable; default is false</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
85+
<tr><td><div id="setting-feature-vector-index-enabled" class="anchored"><code>feature.vector_index.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable vector indexes, false to disable; default is true</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
8686
<tr><td><div id="setting-jobs-retention-time" class="anchored"><code>jobs.retention_time</code></div></td><td>duration</td><td><code>336h0m0s</code></td><td>the amount of time for which records for completed jobs are retained</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
8787
<tr><td><div id="setting-kv-allocator-lease-rebalance-threshold" class="anchored"><code>kv.allocator.lease_rebalance_threshold</code></div></td><td>float</td><td><code>0.05</code></td><td>minimum fraction away from the mean a store&#39;s lease count can be before it is considered for lease-transfers</td><td>Advanced/Self-Hosted</td></tr>
8888
<tr><td><div id="setting-kv-allocator-load-based-lease-rebalancing-enabled" class="anchored"><code>kv.allocator.load_based_lease_rebalancing.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to enable rebalancing of range leases based on load and latency</td><td>Advanced/Self-Hosted</td></tr>

pkg/sql/backfill/backfill_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ func TestVectorColumnAndIndexBackfill(t *testing.T) {
5252
defer srv.Stopper().Stop(ctx)
5353
sqlDB := sqlutils.MakeSQLRunner(db)
5454

55-
// Enable vector indexes.
56-
sqlDB.Exec(t, `SET CLUSTER SETTING feature.vector_index.enabled = true`)
57-
5855
// Create a table with a vector column
5956
sqlDB.Exec(t, `
6057
CREATE TABLE vectors (
@@ -119,9 +116,6 @@ func TestConcurrentOperationsDuringVectorIndexCreation(t *testing.T) {
119116
defer srv.Stopper().Stop(ctx)
120117
sqlDB := sqlutils.MakeSQLRunner(db)
121118

122-
// Enable vector indexes.
123-
sqlDB.Exec(t, `SET CLUSTER SETTING feature.vector_index.enabled = true`)
124-
125119
// Create a table with a vector column
126120
sqlDB.Exec(t, `
127121
CREATE TABLE vectors (
@@ -204,9 +198,6 @@ func TestVectorIndexWithPrefixBackfill(t *testing.T) {
204198
defer srv.Stopper().Stop(ctx)
205199
sqlDB := sqlutils.MakeSQLRunner(db)
206200

207-
// Enable vector indexes.
208-
sqlDB.Exec(t, `SET CLUSTER SETTING feature.vector_index.enabled = true`)
209-
210201
// Create a table with a vector column + a prefix column.
211202
sqlDB.Exec(t, `
212203
CREATE TABLE items (
@@ -276,9 +267,6 @@ func TestVectorIndexMergingDuringBackfill(t *testing.T) {
276267
defer srv.Stopper().Stop(ctx)
277268
sqlDB := sqlutils.MakeSQLRunner(db)
278269

279-
// Enable vector indexes.
280-
sqlDB.Exec(t, `SET CLUSTER SETTING feature.vector_index.enabled = true`)
281-
282270
// Enable deterministic vector index fixups for consistent testing.
283271
sqlDB.Exec(t, `SET CLUSTER SETTING sql.vecindex.deterministic_fixups.enabled = true`)
284272

@@ -373,9 +361,6 @@ func TestVectorIndexMergingDuringBackfillWithPrefix(t *testing.T) {
373361
defer srv.Stopper().Stop(ctx)
374362
sqlDB := sqlutils.MakeSQLRunner(db)
375363

376-
// Enable vector indexes.
377-
sqlDB.Exec(t, `SET CLUSTER SETTING feature.vector_index.enabled = true`)
378-
379364
// Enable deterministic vector index fixups for consistent testing.
380365
sqlDB.Exec(t, `SET CLUSTER SETTING sql.vecindex.deterministic_fixups.enabled = true`)
381366

pkg/sql/catalog/tabledesc/index_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ func TestIndexInterface(t *testing.T) {
5151
}
5252
runner := sqlutils.MakeSQLRunner(conn)
5353

54-
// Enable vector indexes.
55-
runner.Exec(t, `SET CLUSTER SETTING feature.vector_index.enabled = true`)
56-
5754
runner.Exec(t, `
5855
CREATE TABLE d.t (
5956
c1 INT,

pkg/sql/logictest/logic.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,14 +1881,6 @@ func (t *logicTest) newCluster(
18811881
}
18821882
}
18831883

1884-
// Enable vector indexes by default for tests.
1885-
// TODO(andyk): Remove this once vector indexes are enabled by default.
1886-
if _, err := conn.Exec(
1887-
"SET CLUSTER SETTING feature.vector_index.enabled = true",
1888-
); err != nil {
1889-
t.Fatal(err)
1890-
}
1891-
18921884
// Ensure that vector index background operations are deterministic, so
18931885
// that tests don't flake.
18941886
if _, err := conn.Exec(

pkg/sql/logictest/testdata/logic_test/event_log

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,6 @@ ORDER BY "timestamp", info
492492
----
493493
1 {"ApplicationName": "$ internal-optInToDiagnosticsStatReporting", "DefaultValue": "true", "EventType": "set_cluster_setting", "SettingName": "diagnostics.reporting.enabled", "Statement": "SET CLUSTER SETTING \"diagnostics.reporting.enabled\" = true", "Tag": "SET CLUSTER SETTING", "User": "node", "Value": "true"}
494494
1 {"DefaultValue": "-10s", "EventType": "set_cluster_setting", "SettingName": "sql.crdb_internal.table_row_statistics.as_of_time", "Statement": "SET CLUSTER SETTING \"sql.crdb_internal.table_row_statistics.as_of_time\" = e'-1\\u00B5s'", "Tag": "SET CLUSTER SETTING", "User": "root", "Value": "-00:00:00.000001"}
495-
1 {"DefaultValue": "false", "EventType": "set_cluster_setting", "SettingName": "feature.vector_index.enabled", "Statement": "SET CLUSTER SETTING \"feature.vector_index.enabled\" = true", "Tag": "SET CLUSTER SETTING", "User": "root", "Value": "true"}
496495
1 {"DefaultValue": "false", "EventType": "set_cluster_setting", "SettingName": "sql.vecindex.deterministic_fixups.enabled", "Statement": "SET CLUSTER SETTING \"sql.vecindex.deterministic_fixups.enabled\" = true", "Tag": "SET CLUSTER SETTING", "User": "root", "Value": "true"}
497496
1 {"DefaultValue": "true", "EventType": "set_cluster_setting", "SettingName": "kv.allocator.load_based_lease_rebalancing.enabled", "Statement": "SET CLUSTER SETTING \"kv.allocator.load_based_lease_rebalancing.enabled\" = false", "Tag": "SET CLUSTER SETTING", "User": "root", "Value": "false"}
498497
1 {"DefaultValue": "true", "EventType": "set_cluster_setting", "SettingName": "kv.allocator.load_based_lease_rebalancing.enabled", "Statement": "SET CLUSTER SETTING \"kv.allocator.load_based_lease_rebalancing.enabled\" = DEFAULT", "Tag": "SET CLUSTER SETTING", "User": "root", "Value": "DEFAULT"}
@@ -513,7 +512,6 @@ ORDER BY "timestamp", info
513512
----
514513
1 {"ApplicationName": "$ internal-optInToDiagnosticsStatReporting", "DefaultValue": "true", "EventType": "set_cluster_setting", "SettingName": "diagnostics.reporting.enabled", "Statement": "SET CLUSTER SETTING \"diagnostics.reporting.enabled\" = true", "Tag": "SET CLUSTER SETTING", "User": "node", "Value": "true"}
515514
1 {"DefaultValue": "-10s", "EventType": "set_cluster_setting", "SettingName": "sql.crdb_internal.table_row_statistics.as_of_time", "Statement": "SET CLUSTER SETTING \"sql.crdb_internal.table_row_statistics.as_of_time\" = e'-1\\u00B5s'", "Tag": "SET CLUSTER SETTING", "User": "root", "Value": "-00:00:00.000001"}
516-
1 {"DefaultValue": "false", "EventType": "set_cluster_setting", "SettingName": "feature.vector_index.enabled", "Statement": "SET CLUSTER SETTING \"feature.vector_index.enabled\" = true", "Tag": "SET CLUSTER SETTING", "User": "root", "Value": "true"}
517515
1 {"DefaultValue": "false", "EventType": "set_cluster_setting", "SettingName": "sql.vecindex.deterministic_fixups.enabled", "Statement": "SET CLUSTER SETTING \"sql.vecindex.deterministic_fixups.enabled\" = true", "Tag": "SET CLUSTER SETTING", "User": "root", "Value": "true"}
518516
1 {"EventType": "set_cluster_setting", "PlaceholderValues": ["'some string'"], "SettingName": "cluster.label", "Statement": "SET CLUSTER SETTING \"cluster.label\" = $1", "Tag": "SET CLUSTER SETTING", "User": "root", "Value": "'some string'"}
519517

pkg/sql/logictest/testdata/logic_test/system

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ ORDER BY name
314314
----
315315
cluster.secret
316316
diagnostics.reporting.enabled
317-
feature.vector_index.enabled
318317
sql.crdb_internal.table_row_statistics.as_of_time
319318
sql.vecindex.deterministic_fixups.enabled
320319
version
@@ -332,7 +331,6 @@ ORDER BY name
332331
----
333332
cluster.secret
334333
diagnostics.reporting.enabled
335-
feature.vector_index.enabled
336334
sql.crdb_internal.table_row_statistics.as_of_time
337335
sql.vecindex.deterministic_fixups.enabled
338336
version
@@ -355,7 +353,6 @@ AND name NOT IN ('version', 'cluster.secret', 'kv.range_merge.queue_enabled')
355353
ORDER BY name
356354
----
357355
diagnostics.reporting.enabled true
358-
feature.vector_index.enabled true
359356
somesetting somevalue
360357
sql.crdb_internal.table_row_statistics.as_of_time -1µs
361358
sql.vecindex.deterministic_fixups.enabled true
@@ -373,7 +370,6 @@ AND name NOT IN ('version', 'cluster.secret')
373370
ORDER BY name
374371
----
375372
diagnostics.reporting.enabled true
376-
feature.vector_index.enabled true
377373
somesetting somevalue
378374
sql.crdb_internal.table_row_statistics.as_of_time -1µs
379375
sql.vecindex.deterministic_fixups.enabled true

0 commit comments

Comments
 (0)