Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-27216

Upgrade RoaringBitmap to 0.7.45 to fix Kryo unsafe ser/dser issue

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.3, 2.4.0, 3.0.0
    • Fix Version/s: 2.3.4, 2.4.2, 3.0.0
    • Component/s: Spark Core
    • Labels:

      Description

      HighlyCompressedMapStatus uses RoaringBitmap to record the empty blocks. But RoaringBitmap-0.5.11 couldn't be ser/deser with unsafe KryoSerializer.

      We can use below UT to reproduce:

        test("kryo serialization with RoaringBitmap") {
          val bitmap = new RoaringBitmap
          bitmap.add(1787)
      
          val safeSer = new KryoSerializer(conf).newInstance()
          val bitmap2 : RoaringBitmap = safeSer.deserialize(safeSer.serialize(bitmap))
          assert(bitmap2.equals(bitmap))
      
          conf.set("spark.kryo.unsafe", "true")
          val unsafeSer = new KryoSerializer(conf).newInstance()
          val bitmap3 : RoaringBitmap = unsafeSer.deserialize(unsafeSer.serialize(bitmap))
          assert(bitmap3.equals(bitmap)) // this will fail
        }
      

      Upgrade to latest version 0.7.45 to fix it

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cltlfcjin Lantao Jin
                Reporter:
                cltlfcjin Lantao Jin
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: