Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 406
    • Issues 406
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Merge requests
  • !1895

Resolve "Subsonic search3 not returning all songs"

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Marcos Peña requested to merge 1782-fix-subsonic-search3-not-returning-all-songs into stable Jul 19, 2022
  • Overview 6
  • Commits 2
  • Pipelines 3
  • Changes 3

Closes #1782 (closed)

Removes order_for_search (api/funkwhale_api/common/utils.py) from the queryset since it was ordering by a non unique order and might be the cause of the unpredictable results. Now it's ordered by the pk. According to the docs:

When using LIMIT, it is important to use an ORDER BY clause that constrains the result rows into a unique order. Otherwise you will get an unpredictable subset of the query's rows. You might be asking for the tenth through twentieth rows, but tenth through twentieth in what ordering? The ordering is unknown, unless you specified ORDER BY.

(Maybe we should rethink that function, it's also used in api/funkwhale_api/music/views.py. This could be easily fixed by making the sort key unique by adding the primary key to it.).

As requested, this MR also increases the result limit to 500, in coherence with get_album_list2 by the way.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 1782-fix-subsonic-search3-not-returning-all-songs