Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-3332

Master coredump when add columns after unsafe_rebuild master

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • NA
    • 1.16.0
    • CLI
    • None

    Description

      When do master unsafe_rebuild, tables' next_column_id is set to (2^31 - 1) / 2, i.e. 2^30 - 1.

      After that, new added column's id is set to 2^30 - 1, 2^30, 2^30 + 1, ... We use an IdMapping to maintainance column id to it's index, like 2^30 - 1 -> 200,  2^30 -> 201, 2^30 + 1 -> 202.

      However, the IdMapping's implemention use a vector to save all the k-v pairs, and the key is nearly the index of IdMapping. So we have to use a very large vector to save a column id like 2^30, and future more, it will increase doubly when found capacity not enough.

      When the column id is 2^30, the double size is 2^31, which is overflow, will cause master crash.

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            laiyingchun Yingchun Lai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: