Skip to content

Commit 14a1ef9

Browse files
authored
Merge pull request ceph#56114 from xxhdx1985126/wip-seastore-teuthology-max-test-attr-len
src/test/TestRados: add max-attr-len to control the max length of attributes sent to OSDs Reviewed-by: Samuel Just <[email protected]> Reviewed-by: Matan Breizman <[email protected]>
2 parents fd7b38b + 4594355 commit 14a1ef9

File tree

7 files changed

+12
-2
lines changed

7 files changed

+12
-2
lines changed

qa/suites/crimson-rados-experimental/seastore/basic/tasks/readwrite.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tasks:
1111
clients: [client.0]
1212
ops: 4000
1313
objects: 500
14+
max_attr_len: 8192
1415
op_weights:
1516
read: 45
1617
write: 45

qa/suites/crimson-rados/thrash/workloads/small-objects-balanced.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ tasks:
1010
objects: 1024
1111
size: 16384
1212
balance_reads: true
13+
max_attr_len: 8192
1314
op_weights:
1415
read: 100
1516
write: 100

qa/suites/crimson-rados/thrash/workloads/small-objects-localized.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ tasks:
1010
objects: 1024
1111
size: 16384
1212
localize_reads: true
13+
max_attr_len: 8192
1314
op_weights:
1415
read: 100
1516
write: 100

qa/suites/crimson-rados/thrash/workloads/small-objects.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tasks:
99
max_in_flight: 64
1010
objects: 1024
1111
size: 16384
12+
max_attr_len: 8192
1213
op_weights:
1314
read: 100
1415
write: 100

qa/tasks/rados.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ def task(ctx, config):
175175
'--size', str(object_size),
176176
'--min-stride-size', str(config.get('min_stride_size', object_size // 10)),
177177
'--max-stride-size', str(config.get('max_stride_size', object_size // 5)),
178-
'--max-seconds', str(config.get('max_seconds', 0))
178+
'--max-seconds', str(config.get('max_seconds', 0)),
179+
'--max-attr-len', str(config.get('max_attr_len', 20000))
179180
])
180181

181182
weights = {}

src/test/osd/RadosModel.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ class RadosTestContext {
215215
bool enable_dedup,
216216
std::string chunk_algo,
217217
std::string chunk_size,
218+
size_t max_attr_len,
218219
const char *id = 0) :
219220
pool_obj_cont(),
220221
current_snap(0),
@@ -226,7 +227,7 @@ class RadosTestContext {
226227
rados_id(id), initialized(false),
227228
max_size(max_size),
228229
min_stride_size(min_stride_size), max_stride_size(max_stride_size),
229-
attr_gen(2000, 20000),
230+
attr_gen(2000, max_attr_len),
230231
no_omap(no_omap),
231232
no_sparse(no_sparse),
232233
pool_snaps(pool_snaps),

src/test/osd/TestRados.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ int main(int argc, char **argv)
523523
bool enable_dedup = false;
524524
string chunk_algo = "";
525525
string chunk_size = "";
526+
size_t max_attr_len = 20000;
526527

527528

528529
for (int i = 1; i < argc; ++i) {
@@ -554,6 +555,8 @@ int main(int argc, char **argv)
554555
pool_snaps = true;
555556
else if (strcmp(argv[i], "--write-fadvise-dontneed") == 0)
556557
write_fadvise_dontneed = true;
558+
else if (strcmp(argv[i], "--max-attr-len") == 0)
559+
max_attr_len = atoi(argv[++i]);
557560
else if (strcmp(argv[i], "--ec-pool") == 0) {
558561
if (!op_weights.empty()) {
559562
cerr << "--ec-pool must be specified prior to any ops" << std::endl;
@@ -700,6 +703,7 @@ int main(int argc, char **argv)
700703
enable_dedup,
701704
chunk_algo,
702705
chunk_size,
706+
max_attr_len,
703707
id);
704708

705709
TestOpStat stats;

0 commit comments

Comments
 (0)