log error when idempotency request not finished
parent
76f757f2bd
commit
ad8a7c379b
|
|
@ -170,9 +170,9 @@ void client_channel_destroy()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
struct fast_task_info *alloc_channel_task(IdempotencyClientChannel *channel,
|
static struct fast_task_info *alloc_channel_task(IdempotencyClientChannel
|
||||||
const uint32_t hash_code, const char *server_ip, const uint16_t port,
|
*channel, const uint32_t hash_code, const char *server_ip,
|
||||||
int *err_no)
|
const uint16_t port, int *err_no)
|
||||||
{
|
{
|
||||||
struct fast_task_info *task;
|
struct fast_task_info *task;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,9 @@ IdempotencyRequest *sf_server_update_prepare_and_check(
|
||||||
*result = idempotency_channel_add_request(channel, request);
|
*result = idempotency_channel_add_request(channel, request);
|
||||||
if (*result == EEXIST) {
|
if (*result == EEXIST) {
|
||||||
if (!request->finished) {
|
if (!request->finished) {
|
||||||
|
response->error.length = sprintf(response->error.message,
|
||||||
|
"idempotency req id: %"PRId64" exists but NOT "
|
||||||
|
"finished", request->req_id);
|
||||||
*result = EAGAIN;
|
*result = EAGAIN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue