modeldb icon indicating copy to clipboard operation
modeldb copied to clipboard

Added catch for the optimistic lock exception on reconcile deletion

Open anandjakhaniya opened this issue 3 years ago • 2 comments

anandjakhaniya avatar Mar 09 '21 12:03 anandjakhaniya

We should not be masking exceptions. It's important for the system to know that the operation it tried to do didn't go through vs just ignoring it.

but due to single failed entry the other one not delete. we are logging exception as error properly so we knew the error. so masking is good to have there. we are following this pattern on the old DeleteEntitiesCron job.

anandjakhaniya avatar Mar 10 '21 07:03 anandjakhaniya

We should not be masking exceptions. It's important for the system to know that the operation it tried to do didn't go through vs just ignoring it.

but due to single failed entry the other one not delete. we are logging exception as error properly so we knew the error. so masking is good to have there. we are following this pattern on the old DeleteEntitiesCron job.

Masking is not good to have there, actually. The reconciler machinery is more complex than just a cron job, so letting the wrapper handle failures is better for you (e.g. do a retry). It's ok that the others are not deleted. It's a trade-off when we want to do batch things. We ignored the error in the cronjob bc it was driven by a clock alone, so we wanted to delete as much as possible in that clock tick, but that's now always the best behavior.

conradoverta avatar Mar 10 '21 18:03 conradoverta

This is too old and now we have reconciler implemented so not need this anymore.

anandjakhaniya avatar Feb 27 '23 11:02 anandjakhaniya