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

Remove lock acquisition in doMaintenance() by making a deep copy of file mappings in RocksDBFileManager in load()

    XMLWordPrintableJSON

Details

    Description

      Currently the lock of the RocksDB state store is acquired when uploading the snapshot inside maintenance tasks when change log checkpointing is enabled, which causes lock contention between query processing tasks and state maintenance thread. We want to eliminate lock contention to decrease latency of streaming queries so lock acquisition inside maintenance tasks should be avoided. This can introduce race conditions between task and maintenance threads. By making a deep copy of versionToRocksDBFiles and localFilesToDfsFiles in RocksDBFileManager, we can ensure that the file manager state is not updated by task thread when background snapshot uploading tasks attempt to upload a snapshot.

      Attachments

        Issue Links

          Activity

            People

              riya-verm Riya Verma
              riya-verm Riya Verma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: