The order of events within the joining is crucial. In the past several bugs have arisen due to this order being incorrect. We need to notify both the left and right contigs of the change, to join the two registration lists, and to delete the contig. Deleting the contig must be the last operation as this may renumber one of our contigs.
The order used is as follows, assuming we are joining two contigs together. We join 'left' to 'right', giving a new contig 'left'.
contig_register_join
. We copy
'right' to 'left', leaving 'right' unchanged. It is required to leave
'right' unchanged so that the delete request is acknowledged.