Soru

Zorluk: OrtaImplement Azure Blob Storage Lifecycle Management and Retention Policies

An e-commerce platform uses a Standard General Purpose v2 (GPv2) storage account to store shopping cart session states as block blobs. You configure the following lifecycle management policy to automatically delete abandoned shopping carts after 7 days:

{
"rules": [
{
"enabled": true,
"name": "delete-abandoned-sessions",
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"delete": {
"daysAfterModificationGreaterThan": 7
}
}
},
"filters": {
"blobTypes": [
"blockBlob"
],
"blobIndexMatch": [
{
"name": "CartStatus",
"op": "==",
"value": "abandoned"
}
]
}
}
}
]
}

Several block blobs last modified 10 days ago have not been deleted. You confirm the lifecycle policy executed successfully within the last 24 hours. Which of the following is the most likely reason these blobs were not deleted?

  1. The blob index tags on the blobs use the key name 'cartstatus' in all lowercase, which fails to match the case-sensitive filter key 'CartStatus'.Cevap
  2. B
    The blobs have an active lease, which permanently disables lifecycle policy evaluation for those blobs even after the lease is released.
  3. C
    The blobs are accessed using a Shared Access Signature (SAS) token that has write permission, which overrides the lifecycle policy and prevents automatic deletion.
  4. D
    The lifecycle policy filter configuration must prefix the tag name with 'x-ms-meta-' to match metadata headers.

Cevap

The blob index tags on the blobs use the key name 'cartstatus' in all lowercase, which fails to match the case-sensitive filter key 'CartStatus'.
The correct answer is correct because Azure Blob Storage index tags are case-sensitive. The filter specifies 'CartStatus' as the key, meaning any blobs tagged with 'cartstatus' in lowercase will not match the rule and will not be processed for deletion.

Adım Adım Çözüm

1
Analyze the filter criteria in the JSON lifecycle management policy.
The filter specifies a blob index match where the key 'CartStatus' must equal 'abandoned'.
This determines which blobs are scoped for the deletion rule.
2
Evaluate how Azure Storage processes blob index tag matches.
Blob index tag keys and values are strictly case-sensitive.
To identify if a casing mismatch prevents the rule from finding matching blobs.
3
Examine the mismatch between the key on the uploaded blobs ('cartstatus') and the filter key ('CartStatus').
Because 'cartstatus' does not match 'CartStatus', the blobs are excluded from the policy action.
To explain the root cause of why the 10-day-old blobs were not deleted.

Anahtar Kavram

Blob index tags are case-sensitive when used in lifecycle management filters.
Bu soruyu puanla