[ZBX-24733] history.push inserts duplicated history rows Created: 2024 Jun 26  Updated: 2024 Nov 19  Resolved: 2024 Sep 13

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 7.0.0
Fix Version/s: 7.0.4rc1, 7.2.0alpha1

Type: Problem report Priority: Trivial
Reporter: Ruslan Aznabaev Assignee: Dmitrijs Goloscapovs
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 7h
Original Estimate: Not Specified

Issue Links:
Duplicate
Team: Team A
Sprint: Prev.Sprint, S24-W34/35
Story Points: 1

 Description   

Steps to reproduce:

  1. Send history.push without clock and ns a few times in one second.

Result:
Zabbix Server tries to insert row with ns=0.

3259167:20240626:161246.524 [Z3008] query failed due to primary key constraint: [0] PGRES_FATAL_ERROR:ERROR:  duplicate key value violates unique constraint "21645_11430_history_str_pkey"
DETAIL:  Key (itemid, clock, ns)=(2531417, 1719407565, 0) already exists. 

It leads to 100% utilization of history syncer internal processes and false alerts, because of nodata.
Expected:
If clock or ns are not present, history.push must populate them with current timestamp.
Or clock and ns must be required.

 



 Comments   
Comment by Dmitrijs Goloscapovs [ 2024 Sep 12 ]

Available in versions:

Generated at Sat Apr 26 03:45:48 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.