From 8b552a01f9b2b2c4c33a3f5ccaa406c110af788b Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Wed, 25 Jan 2023 01:30:36 +0300 Subject: [PATCH] Do not retry successful operation parts in client (could lead to "double free" bugs) --- src/cluster_client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cluster_client.cpp b/src/cluster_client.cpp index 414e7154..7c1fd8e9 100644 --- a/src/cluster_client.cpp +++ b/src/cluster_client.cpp @@ -757,7 +757,10 @@ resume_3: { for (int i = 0; i < op->parts.size(); i++) { - op->parts[i].flags = PART_RETRY; + if (!(op->parts[i].flags & PART_DONE)) + { + op->parts[i].flags = PART_RETRY; + } } goto resume_2; }