Closed Bug 1655953 Opened 1 year ago Closed 5 months ago

Remove the mutex for padding file

Categories

(Core :: Storage: Cache API, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: tt, Assigned: tt)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

See: https://phabricator.services.mozilla.com/D80823#2631981

We need the mutex for the padding file because it can be accessed on the main thread and the Cache IO thread (one per origin).

We need to access it on the main thread because:

  1. InitOrigin
  2. GetUsage

(1) doesn't really matter because when we are there, the cache IO thread shouldn't have existed yet.

(2) is going to be removed by getting the cached usage in D80823.

So, hopefully, we can remove the mutex.

Attachment #9166813 - Attachment description: Bug 1655953 - WIP; → Bug 1655953 - Remove mutex lock for protecting the padding file;

I will update patches for:

  • Revise padding functions
  • Consider using CACHE_TRY for padding functions or CacheQuotaClient::InitOrigin.
    • I will need to check if there will have too many warnings when there are failures.
Attachment #9166813 - Attachment description: Bug 1655953 - Remove mutex lock for protecting the padding file; → WIP: Bug 1655953 - Remove mutex lock for protecting the padding file;
Attachment #9166813 - Attachment description: WIP: Bug 1655953 - Remove mutex lock for protecting the padding file; → Bug 1655953 - Remove mutex lock for protecting the padding file;
Pushed by shes050117@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/d05d2e1fc2a1
Remove mutex lock for protecting the padding file; r=dom-workers-and-storage-reviewers,sg,asuth,janv
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.