How to fix "LeaseIdMissing" or "LeaseNotPresent" Error in Synapse pipeline

Kiran 26 Reputation points
2023-10-30T06:46:56.86+00:00

Hello,

In past couple of weeks we are facing issues with data lake loads. As a part of the process we delete historical data from the data lake and reload the data into the data lake through synapse pipelines. When trying to delete the historical data folder we run into following error. We have been running this process for nearly 2 years and never ran into this issue before. Nothing has changed on the process or pipeline's logic.

If the error is not visible from screenshot below is the YAML version of the error:

"errorCode": "BadRequest",
"message": "Operation on target DeleteFolder failed: Failed to execute delete activity with data source 'AzureBlobFS' and error 'ADLS Gen2 operation failed for: Operation returned an invalid status code 'PreconditionFailed'. Account: ''. FileSystem: 'data'. Path: 'landing/boss/tworkorderheader/HistoricalLoad/tworkorderheader-2012-3_00000.parquet'. ErrorCode: 'LeaseIdMissing'. Message: 'There is currently a lease on the resource and no lease ID was specified in the request.'. RequestId: 'c13f663a-a01f-008b-2228-09e493000000'.

Checked the data lake for the parquet file in the question and the "Lease State" is not acquired as shown in the second image.

I have tried limiting the concurrency on the delete activity to make sure that the same file is not being accessed by some other process but it didn't worked either.

Any help is much appreciated. Thanks!

User's image

User's image

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,410 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,629 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,026 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vijayan, Uvaneswaran 20 Reputation points
    2024-04-24T04:10:25.4633333+00:00

    Enabling all the networks and disabling the lease through cloud Shell xi earned the trick.

    However if i use firewall networks due to the our hybrid regulation that every traffic needs to be monitored why i am unable to delete. Seems doesn't make sense. What shall we do to whitelist or enable for us to delete while under firewall networks.

    While the environment is strapped, now when i run the cloud shell command to delete a snapshot to test the vault.

    What can we do without enabling the storage account configuration " enabled from all networks"

    0 comments No comments