Ad Widget

Collapse

Wrong key 'history_text_3' in table 'history_text' after upgrade from 2.2.18 to 3.4.3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lentyai
    Junior Member
    Zabbix Certified Specialist
    • Oct 2008
    • 29

    #1

    Wrong key 'history_text_3' in table 'history_text' after upgrade from 2.2.18 to 3.4.3

    Hello,

    Yesterday after zabbix upgrade from 2.2.18 to 3.4.3 I saw a lot of messages in log file like

    2353:20171222:115113.674 [Z3005] query failed: [1062] Duplicate entry '1513943473' for key 'history_text_3' [insert into history_text (itemid,clock,ns,value) values (5105100009092720,1513943473,86941377,'NO FAILURES'),(5105100009092722,1513943473,86941377,' NO SUCCESSES');
    In database I found that unique key 'history_text_3' contains only 'clock' field. Why? This is EPOCH value. Zabbix can collect a lot of values in one second.
    What's happened?

    I guess, I can remove this key from the table without any negative effect.
  • volter
    Member
    Zabbix Certified Specialist
    • Dec 2011
    • 85

    #2
    Any chance somebody created this manually? I can't find any reference to it. A look at the 3.4 schema SQL indicates, that no such index should exist. And for the sake of completeness, there's the ns column too, that contains nanoseconds, so this constraint would not even be complete.
    Last edited by volter; 27-12-2017, 02:01.

    Comment

    • lentyai
      Junior Member
      Zabbix Certified Specialist
      • Oct 2008
      • 29

      #3
      Originally posted by volter
      Any chance somebody created this manually? I can't find any reference to it.
      Hm. It's possible. I don't find such index in sources schema from Zabbix 2.0.10. But nobody knows when it was created. In this case, I can drop this index before upgrade.

      Comment

      Working...