Skip to content

Commit bb5ee12

Browse files
fix
1 parent 1a8e912 commit bb5ee12

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

data_store_service_client.cpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* <http://www.gnu.org/licenses/>.
2020
*
2121
*/
22+
#include "data_store_service_client.h"
23+
2224
#include <glog/logging.h>
2325

2426
#include <boost/lexical_cast.hpp>
@@ -34,7 +36,6 @@
3436
#include <vector>
3537

3638
#include "cc_req_misc.h"
37-
#include "data_store_service_client.h"
3839
#include "data_store_service_client_closure.h"
3940
#include "data_store_service_config.h"
4041
#include "data_store_service_scanner.h"
@@ -444,6 +445,11 @@ bool DataStoreServiceClient::PutAll(
444445
LOG(ERROR) << "PutAll failed for partition "
445446
<< partition_state->partition_id << " with error: "
446447
<< partition_state->result.error_msg();
448+
for (auto &callback_data : callback_data_list)
449+
{
450+
callback_data->Clear();
451+
callback_data->Free();
452+
}
447453
return false;
448454
}
449455
}
@@ -4369,16 +4375,16 @@ void DataStoreServiceClient::UpsertTable(UpsertTableData *table_data)
43694375
if (alter_table_info)
43704376
{
43714377
auto *new_table_schema = table_data->new_table_schema_;
4372-
ok =
4373-
ok &&
4374-
std::all_of(
4375-
alter_table_info->index_add_names_.begin(),
4376-
alter_table_info->index_add_names_.end(),
4377-
[this, new_table_schema](
4378-
const std::pair<txservice::TableName, std::string> &p) {
4379-
return InitTableRanges(p.first,
4380-
new_table_schema->Version());
4381-
});
4378+
ok = ok &&
4379+
std::all_of(
4380+
alter_table_info->index_add_names_.begin(),
4381+
alter_table_info->index_add_names_.end(),
4382+
[this, new_table_schema](
4383+
const std::pair<txservice::TableName, std::string> &p)
4384+
{
4385+
return InitTableRanges(p.first,
4386+
new_table_schema->Version());
4387+
});
43824388
}
43834389

43844390
// 3- Delete table statistics
@@ -4752,4 +4758,4 @@ void DataStoreServiceClient::PrepareRangePartitionBatches(
47524758
}
47534759
}
47544760

4755-
} // namespace EloqD
4761+
} // namespace EloqDS

0 commit comments

Comments
 (0)