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

Replicated log key encoding overflows into negative values

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.3, 1.8.1, 1.9.1, 1.11.0, 1.10.1, 1.12.0
    • Fix Version/s: 1.12.0
    • Component/s: replicated log
    • Labels:
      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

            • Assignee:
              cf.natali Charles Natali
              Reporter:
              ipronin Ilya
              Shepherd:
              Andrei Sekretenko

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment