Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-10216

Replicated log key encoding overflows into negative values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.3, 1.8.1, 1.9.1, 1.11.0, 1.10.1, 1.12.0
    • 1.12.0
    • replicated log
    • None

    Description

      LevelDB keys used by LevelDBStorage are uint64_t log positions encoded as strings and padded with zeroes up to a certain fixed size. The encode() function is incorrect because it uses the %d formatter that expects an int. It also limits the key size to 10 digits which is OK for UINT32_MAX but isn't enough for UINT64_MAX.

      Because of this the available key range is reduced, and key overflow can result in replica's METADATA record (position 0) being overwritten, which in turn may cause data loss.

      Attachments

        Activity

          People

            cf.natali Charles Natali
            ipronin Ilya
            Andrei Sekretenko Andrei Sekretenko
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: