kruize / autotune

Autonomous Performance Tuning for Kubernetes!
Apache License 2.0
164 stars 54 forks source link

Suppress duplicate Key value error message #998

Closed rbadagandi1 closed 7 months ago

rbadagandi1 commented 1 year ago

Timestamp already exists errors - [Detail: Key (experiment_name, interval_end_time, interval_start_time)=(11787264|345199|683cb481-8f8f-4948-9173-29f730c5c03f|btr-spm-solution-prod|deployment|app-s2m-prd, 2023-10-11 00:30:00, 2023-10-11 00:15:01) already exists. 2023-10-1815:07:41.847 ERROR [qtp88397182-34][SqlExceptionHelper.java(138)]-ERROR: duplicate key value violates unique constraint "kruize_results_20231011_pkey" - This is due to the new cost operator that now sends aggregated records through out the day for customer that have enabled it.

For the last 6 hr period of the day, Kruize will have to reject 75% of the records as these would already have been added. Kruize will for now suppress printing the “duplicate key value” error message.

rbadagandi1 commented 1 year ago

Completed as part of PR #1004

msvinaykumar commented 1 year ago

Seems we not resolved this issue @khansaad please confirm .

It appears that we're unable to resolve this problem since the message is being generated by a third-party Java package, making it challenging to manage the logging messages.

rbadagandi1 commented 1 year ago

This issue is partially fixed as part of PR #1004

We're unable to suppress the duplicate record error coming from the SQLExceptionHelper class. This needs to be handled at log4j properties file

khansaad commented 7 months ago

Completed as part of #1070