From 9e7630869e25063aa381a88c194846f47e8adba4 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Tue, 11 Oct 2022 13:46:17 -0700 Subject: [PATCH] Test ids > 16 bytes in workload --- fdbserver/workloads/AutomaticIdempotencyWorkload.actor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdbserver/workloads/AutomaticIdempotencyWorkload.actor.cpp b/fdbserver/workloads/AutomaticIdempotencyWorkload.actor.cpp index 1f0f7b352a..9da78044b2 100644 --- a/fdbserver/workloads/AutomaticIdempotencyWorkload.actor.cpp +++ b/fdbserver/workloads/AutomaticIdempotencyWorkload.actor.cpp @@ -46,7 +46,10 @@ struct AutomaticIdempotencyWorkload : TestWorkload { ACTOR static Future _start(AutomaticIdempotencyWorkload* self, Database cx) { state int i = 0; for (; i < self->numTransactions; ++i) { - state Value idempotencyId = BinaryWriter::toValue(deterministicRandom()->randomUniqueID(), Unversioned()); + // Half direct representation, half indirect representation + int length = deterministicRandom()->coinflip() ? 16 : deterministicRandom()->randomInt(17, 256); + state Value idempotencyId = makeString(length); + deterministicRandom()->randomBytes(mutateString(idempotencyId), length); TraceEvent("IdempotencyIdWorkloadTransaction").detail("Id", idempotencyId); wait(runRYWTransaction( cx, [self = self, idempotencyId = idempotencyId](Reference tr) {