Project

General

Profile

Actions

Bug #12791

open

[API] fix race between arrival of trash time and next sweep

Added by Ward Vandewege about 7 years ago. Updated 10 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Story points:
-
Release:
Release relationship:
Auto

Description

As evidenced in #12790, there exists a race between when the trash time arrives for a collection, and the next trash sweep. During that period, accessing a collection by PDH results in a 401 ("Expired permission signature"). Tom put it like this:

Even with this config fixed, there's obviously a race condition that we need to fix between when trash time arrives and the next sweep. Here it's just glaringly obvious because the race window is forever.

In #12790 we noticed this problem because trash_sweep_interval was set to 0s.

Actions #1

Updated by Ward Vandewege about 7 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Ward Vandewege about 7 years ago

  • Description updated (diff)
  • Status changed from In Progress to New
Actions #4

Updated by Ward Vandewege about 7 years ago

  • Description updated (diff)
Actions #5

Updated by Tom Clegg about 7 years ago

is_trashed is a cache of trash_at<now. When it's out of date:
  • when getting a collection by PDH and there are multiple candidates, we might accidentally choose one that expires soon (or in the past), and give the client signatures that expire sooner than necessary (or are already expired and therefore completely useless)
  • when getting a collection by UUID, and include_trash is false, we might return a trashed collection anyway, which is wrong
  • when getting a list of collections, and include_trash is false, we might include some trashed collections in the results
  • when getting a list of collections, and include_trash is false, we might include some trashed collections in the items_available count
Actions #6

Updated by Peter Amstutz over 3 years ago

  • Target version deleted (To Be Groomed)
Actions #7

Updated by Peter Amstutz almost 2 years ago

  • Release set to 60
Actions #8

Updated by Peter Amstutz 10 months ago

  • Target version set to Future
Actions

Also available in: Atom PDF