Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20740

Server generated CUIDs are shorter on 32bit systems

XMLWordPrintable

    • Sprint 86 (Mar 2022)
    • 0.5

      When generating CUID server constructs timestamp part without adding padding

      gettimeofday(&current_time, NULL);
      from_decimal(timestamp, CUID_BASE_36, (size_t)(current_time.tv_sec * 1000 + current_time.tv_usec / 1000));
      

      However on 32 bit systems size_t is only 4 bytes which will cause the timestamp value to wrap around and be shorter, resulting in 24 character CUIDs.

      The timestamp value also must be padded so CUIDs have fixed 25 character length.

        1. multiple_active_nodes.gif
          multiple_active_nodes.gif
          2.44 MB
        2. screenshot-1.png
          screenshot-1.png
          459 kB
        3. zabbix_server.log
          414 kB

            wiper Andris Zeila
            wiper Andris Zeila
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: