Skip to content

Commit d37ff81

Browse files
authored
Merge pull request #20161 from serathius/antithesis-remove-defrag
Remove defragment requests from linearization
2 parents b6a4e35 + dcaddc6 commit d37ff81

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

tests/robustness/validate/validate.go

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,19 @@ func prepareAndCategorizeOperations(reports []report.ClientReport) (linearizable
7272
serializable = append(serializable, op)
7373
}
7474
// Remove failed read requests as they are not relevant for linearization.
75-
if response.Error == "" || !request.IsRead() {
76-
// For linearization, we set the return time of failed requests to MaxInt64.
77-
// Failed requests can still be persisted, however we don't know when request has taken effect.
78-
if response.Error != "" {
79-
op.Return = math.MaxInt64
80-
}
81-
linearizable = append(linearizable, op)
75+
if request.IsRead() && response.Error != "" {
76+
continue
8277
}
78+
// Defragment is not linearizable
79+
if request.Type == model.Defragment {
80+
continue
81+
}
82+
// For linearization, we set the return time of failed requests to MaxInt64.
83+
// Failed requests can still be persisted, however we don't know when request has taken effect.
84+
if response.Error != "" {
85+
op.Return = math.MaxInt64
86+
}
87+
linearizable = append(linearizable, op)
8388
}
8489
}
8590
return linearizable, serializable

0 commit comments

Comments
 (0)