sequencescape icon indicating copy to clipboard operation
sequencescape copied to clipboard

DPL-303 As a Mgr (Tom) I would like to prevent duplicate plate barcodes being created within SequenceScape and the MLWH stock_resource table so that we do not break Heron reporting to the HSA

Open TWJW-SANGER opened this issue 3 years ago • 0 comments

Describe the bug DPL-303 As a Mgr (Tom) I would like to prevent duplicate plate barcodes being created within SequenceScape and the MLWH stock_resource table so that we do not break Heron reporting to the HSA.

It seems duplicate plate barcodes can be created by SequenceScape receiving multiple requests from the lighthouse / cherry track applications. When this happens the reporting assumptions used by CoTrack are broken and their report will fail to generate. It also creates difficult to unpick data within SequenceScape as duplicate plates are then processed through the pipeline.

It seems historically this was allowed to happen, however we should not allow new instances of this problem to arise.

RT Ticket Number 744564

To Reproduce TBD

Expected behaviour I would expect a request to create a new resource with an already used plate barcode to either:

Fail with a suitable error message - this can be problematic in messages systems that are lossey (in practice all message systems). In that if the client sends an initial request to create the resource that succeeds but never receives the server response and then the client attempts a retry it will see a FAIL response. This can create complex client side logic to handle this situation.

OR

Use something like an Idempotency-Key to make resource creation safe to retries. The concept of Idempotency is described here. In general creation requests are not Idempotent, but can be made so using the technique above.

TWJW-SANGER avatar Feb 24 '22 10:02 TWJW-SANGER