Closed Bug 1646022 Opened 4 years ago Closed 4 years ago

Initialization shouldn't fail when there is no database and padding files

Categories

(Core :: Storage: Cache API, defect, P1)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1645943

People

(Reporter: tt, Assigned: tt)

References

(Blocks 1 open bug)

Details

When we are in
CacheQuotaClient::GetUsageForOriginInternal
Steps here are:

  • Get origin directory
  • Append cache directory into file path
  • Get padding size
    • Get from temporary padding file
    • If fails, get from final padding file
    • If fails, get from cache.sqlite database
    • If fails, stop and break the storage init
      ...

Here, however, it's possible that there is no cache.sqlite database, and any padding files.
We shouldn't block the initialization due to this.

Blocks: 1619893

Note that when we are in this situation, it's probably because we crashed in the previous session

(In reply to Tom Tung [:tt, :ttung] from comment #0)

Here, however, it's possible that there is no cache.sqlite database, and any padding files.
We shouldn't block the initialization due to this.

I might miss some other factors for causing the issue.

I wrote a test to verify this by creating an empty cache folder, but the test succeeded.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=61370715eefe4962beea711a110c0366e8799214

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.