Project

General

Profile

Actions

Bug #8638

open

[API] List queries using "distinct" option return incorrect number of items_available

Added by Joshua Randall almost 9 years ago. Updated 10 months ago.

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

Description

For example, on my system there are 54285 "arvados#link" entries, and this is what is returned for items_available for a generic query to select their names:

# arv link list -f '[["link_class", "=", "tag"]]' -s '["name"]' -l 0
{
 "kind":"arvados#linkList",
 "etag":"",
 "self_link":"",
 "offset":0,
 "limit":0,
 "items":[],
 "items_available":54285
}

Exactly the same results are returned when listing with the distinct option:

# arv link list -f '[["link_class", "=", "tag"]]' -s '["name"]' -l 0 -d
{
 "kind":"arvados#linkList",
 "etag":"",
 "self_link":"",
 "offset":0,
 "limit":0,
 "items":[],
 "items_available":54285
}

I've come across this while trying to write code that loops over all available items for arv-mount (to fix #8624), and finding that in this particular case, the query starts returning no items at offset 31749, suggesting to me that there are 31749 distinct tags in my system:

# arv link list -f '[["link_class", "=", "tag"]]' -s '["name"]' -d -l 1 --offset 31748
{
 "kind":"arvados#linkList",
 "etag":"",
 "self_link":"",
 "offset":31748,
 "limit":1,
 "items":[
  {
   "kind":"arvados#link",
   "name":"WGS" 
  }
 ],
 "items_available":54285
}
# arv link list -f '[["link_class", "=", "tag"]]' -s '["name"]' -d -l 1 --offset 31749
{
 "kind":"arvados#linkList",
 "etag":"",
 "self_link":"",
 "offset":31749,
 "limit":1,
 "items":[],
 "items_available":54285
}
Actions #1

Updated by Brett Smith over 8 years ago

  • Subject changed from List queries using "distinct" option return incorrect number of items_available to [API] List queries using "distinct" option return incorrect number of items_available
Actions #2

Updated by Brett Smith over 8 years ago

  • Target version set to Arvados Future Sprints
Actions #3

Updated by Ward Vandewege over 3 years ago

  • Target version deleted (Arvados Future Sprints)
Actions #4

Updated by Peter Amstutz almost 2 years ago

  • Release set to 60
Actions #5

Updated by Peter Amstutz 10 months ago

  • Target version set to Future
Actions

Also available in: Atom PDF