Merge 'disable constraints on stress test' from Pere Diaz Bou

without indexes constraints are useless
Fixes #1774

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #1776
This commit is contained in:
Pere Diaz Bou
2025-06-18 13:24:14 +02:00
4 changed files with 13 additions and 3 deletions

View File

@@ -9,6 +9,9 @@ license.workspace = true
repository.workspace = true
description = "Limbo Rust API"
[features]
index_experimental = ["limbo_core/index_experimental"]
[dependencies]
limbo_core = { workspace = true, features = ["io_uring"] }
thiserror = "2.0.9"

View File

@@ -3,6 +3,9 @@ name = "limbo-multitenancy"
version = "0.1.0"
edition = "2021"
[features]
index_experimental = ["limbo_core/index_experimental"]
[dependencies]
clap = { version = "4.5", features = ["derive"] }
env_logger = "0.11.0"

View File

@@ -14,6 +14,8 @@ publish = false
name = "limbo_stress"
path = "main.rs"
[features]
index_experimental = ["limbo/index_experimental"]
[dependencies]
antithesis_sdk = "0.2.5"
clap = { version = "4.5", features = ["derive"] }

View File

@@ -161,9 +161,11 @@ impl ArbitrarySchema {
.map(|col| {
let mut col_def =
format!(" {} {}", col.name, data_type_to_sql(&col.data_type));
for constraint in &col.constraints {
col_def.push(' ');
col_def.push_str(&constraint_to_sql(constraint));
if cfg!(feature = "index_experimental") {
for constraint in &col.constraints {
col_def.push(' ');
col_def.push_str(&constraint_to_sql(constraint));
}
}
col_def
})