log error when idempotency request not finished

connection_manager
YuQing 2021-01-22 10:13:05 +08:00
parent 76f757f2bd
commit ad8a7c379b
2 changed files with 6 additions and 3 deletions

View File

@ -170,9 +170,9 @@ void client_channel_destroy()
{
}
struct fast_task_info *alloc_channel_task(IdempotencyClientChannel *channel,
const uint32_t hash_code, const char *server_ip, const uint16_t port,
int *err_no)
static struct fast_task_info *alloc_channel_task(IdempotencyClientChannel
*channel, const uint32_t hash_code, const char *server_ip,
const uint16_t port, int *err_no)
{
struct fast_task_info *task;

View File

@ -201,6 +201,9 @@ IdempotencyRequest *sf_server_update_prepare_and_check(
*result = idempotency_channel_add_request(channel, request);
if (*result == EEXIST) {
if (!request->finished) {
response->error.length = sprintf(response->error.message,
"idempotency req id: %"PRId64" exists but NOT "
"finished", request->req_id);
*result = EAGAIN;
}
}