apiclarity icon indicating copy to clipboard operation
apiclarity copied to clipboard

event_annotations batch insert fails

Open xudj14 opened this issue 1 year ago • 2 comments

What happened:

CreateAPIEventAnnotations sometimes fails due to unique constraint violation.

On event_annotations, there's a unique key api_event_ann_idx_model on (module_name, event_id, name). When trying to insert multiple rows this constraint could be violated, and the whole insert operation fails.

What you expected to happen:

Deduplication before trying to batch insert?

How to reproduce it (as minimally and precisely as possible):

Not sure so far. But the problem seems clear.

Are there any error messages in API Clarity logs?

(e.g. kubectl logs -n apiclarity --selector=app=apiclarity) image

Thanks in advance!

xudj14 avatar Nov 03 '22 08:11 xudj14

@klyr can you take a look?

FrimIdan avatar Nov 03 '22 12:11 FrimIdan

Hi @xudj14,

Thank you for the report.

We'll be working on it. My first guess is that we may remove the constraint.

klyr avatar Nov 03 '22 12:11 klyr