mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
[3.5] Backport: non mutating requests pass through quotaKVServer when NOSPACE
Signed-off-by: Vaibhav Mehta <mehvaibh@amazon.com>
This commit is contained in:
@@ -89,6 +89,30 @@ func TestV3StorageQuotaApply(t *testing.T) {
|
||||
case <-time.After(10 * time.Millisecond):
|
||||
}
|
||||
}
|
||||
|
||||
// txn with non-mutating Ops should go through when NOSPACE alarm is raised
|
||||
_, err = kvc0.Txn(context.TODO(), &pb.TxnRequest{
|
||||
Compare: []*pb.Compare{
|
||||
{
|
||||
Key: key,
|
||||
Result: pb.Compare_EQUAL,
|
||||
Target: pb.Compare_CREATE,
|
||||
TargetUnion: &pb.Compare_CreateRevision{CreateRevision: 0},
|
||||
},
|
||||
},
|
||||
Success: []*pb.RequestOp{
|
||||
{
|
||||
Request: &pb.RequestOp_RequestDeleteRange{
|
||||
RequestDeleteRange: &pb.DeleteRangeRequest{
|
||||
Key: key,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.TODO(), RequestWaitTimeout)
|
||||
defer cancel()
|
||||
|
||||
Reference in New Issue
Block a user