Duplicate Client Reference

Good morning,

We found an issue with the a duplicate client reference.

Last October 15 at 21:31:05, we create a new job with these data:

  • “pickup_at”:“2021-10-15T19:41:01.317Z”
  • “client_reference”:“MTMK01001717”

However, at 21:41:12 we received two updates on the status of the order through the webhook with two different id job:

(1)
{
“event”:“job”,
“type”:“create”,
“data”:{
“id”:168122013,
“status”:“searching”,
“comment”:null,
“pickupAt”:null,
“dropoffAt”:null,
“createdAt”:“2021-10-15T21:41:12.000+02:00”,
“endedAt”:null,
“transportType”:{
“code”:null
},
“packageType”:{
“code”:"(hidden)"
},
“originComment”:null,
“destinationComment”:"(hidden)",
“jobReference”:“MTMK01001717”,
“currentDelivery”:null,
“deliveries”:[
{
“id”:170303536,
“clientReference”:“MTMK01001717”
}
]
}
}

(2)
{
“event”:“job”,
“type”:“create”,
“data”:{
“id”:168122014,
“status”:“searching”,
“comment”:null,
“pickupAt”:null,
“dropoffAt”:null,
“createdAt”:“2021-10-15T21:41:12.000+02:00”,
“endedAt”:null,
“transportType”:{
“code”:null
},
“packageType”:{
“code”:"(hidden)"
},
“originComment”:null,
“destinationComment”:"(hidden)",
“jobReference”:“MTMK01001717”,
“currentDelivery”:null,
“deliveries”:[
{
“id”:170303537,
“clientReference”:“MTMK01001717”
}
]
}
}

Could you check why the duplication has occurred, please?

Thanks in advance.
Regards.

Hello!

Having investigated this incident, it seems as though you created these two jobs at almost exactly the same time:

20:41:12.536 for ID 168122014 and 20:41:12.477 for ID 168122013.

Since these two were created almost exactly at the same time, we suspect our databases would not have had enough time to sync before the next client reference came through, with the client reference being validated before being properly stored in our database.

We advise checking that any functionality that could allow the exact same order to be sent twice be adjusted; We will also raise a ticket internally to see if we can further address this issue on our end.

Thank you!

Should you have any further questions please do not hesitate to leave a comment below.

Good morning Henry,

Thank you very much for your answer.

We create only one job at 21:31:05 in the middleware (status: AWAITING_STACK_COMPLETION). Ten minutes later, the jobs 168122014 and 168122013 were released with the same client reference.

It seems that the duplication occurred after the job was released from middleware.

Could be it possible?

Regards.

Good afternoon,

We are currently investigating this issue further internally, we will try to get back to you as soon as possible with regards to this.

Thank you!

Thank you very much!

Good Morning,

We have looked into this issue, identified the error and have now deployed the fix, so everything should be resolved now.

Should you have any further questions please do not hesitate to comment down below!

Thanks you very much for your help.

Have a nice day!