Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordering #260

Merged
merged 20 commits into from
May 18, 2024
Merged

Ordering #260

merged 20 commits into from
May 18, 2024

Conversation

mgdigital
Copy link
Collaborator

@mgdigital mgdigital commented May 18, 2024

This PR adds ordering capability in the API and web UI. There is also some refactoring of the web UI that has significantly improved performance.

To get proper ordering (particularly by seeders/leechers), the index must be reprocessed.

I'm aware that certain combinations of filters and orders can be slow, but for most performance is acceptable. For example, ordering a large filtered result by size (ascending) seems very slow, though descending seems okay - I've experimented with a few indexing and database tweaks without much luck and so decided to leave as-is, it can possibly be addressed later or it may be an inherent limitation of Postgres.

@mgdigital mgdigital merged commit d4448e0 into main May 18, 2024
6 checks passed
@mgdigital mgdigital deleted the ordering branch May 18, 2024 09:30
truecharts-admin referenced this pull request in truecharts/public Jun 8, 2024
… v0.9.0@1c1f1dc by renovate (#23110)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[ghcr.io/bitmagnet-io/bitmagnet](https://togithub.com/bitmagnet-io/bitmagnet)
| minor | `v0.8.0` -> `v0.9.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>bitmagnet-io/bitmagnet
(ghcr.io/bitmagnet-io/bitmagnet)</summary>

###
[`v0.9.0`](https://togithub.com/bitmagnet-io/bitmagnet/releases/tag/v0.9.0)

[Compare
Source](https://togithub.com/bitmagnet-io/bitmagnet/compare/v0.8.0...v0.9.0)

- The main improvement for v0.9.0 is ordering of results in the web UI
and GraphQL API
- An `--apisDisabled` flag was added to the reprocess command to allow
significantly faster reprocessing/classifying without any API calls
(i.e. TMDB), without disabling this globally.
- Optimisations were made to the web UI that significantly improve
responsiveness; the default pagination limit has therefore been
increased to 20
- Reprocessing is now done fully within the queue (so you'll no longer
see a progress bar when running `bitmagnet reprocess`, this is handled
by the new `process_torrent_batch` task)

**IMPORTANT:** Some refactoring of the database was needed to allow for
performant ordering. On first run, a database migration will be applied
that should take no longer than a few minutes, and tasks will be added
to the queue to reindex all torrents. The reindex tasks must complete
before ordering will work correctly; if you have millions of torrents in
your index this may take a day or more, but is significantly faster in
this release than prior versions. Please ensure you have no pending
items in your queue (at the `/metrics` endpoint) before opening any
issues about incorrect ordering.

#### What's Changed

- Use fontsource packages for fonts to ensure deterministic build by
[@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/257](https://togithub.com/bitmagnet-io/bitmagnet/pull/257)
- More Filters against cp. by
[@&#8203;Ewoodss](https://togithub.com/Ewoodss) in
[https://github.com/bitmagnet-io/bitmagnet/pull/254](https://togithub.com/bitmagnet-io/bitmagnet/pull/254)
- Ordering by [@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/260](https://togithub.com/bitmagnet-io/bitmagnet/pull/260)
- Bump rexml from 3.2.6 to 3.2.8 in /bitmagnet.io by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/bitmagnet-io/bitmagnet/pull/259](https://togithub.com/bitmagnet-io/bitmagnet/pull/259)
- Split gen task to individual tasks by
[@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/261](https://togithub.com/bitmagnet-io/bitmagnet/pull/261)
- Parallel search strategies by
[@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/264](https://togithub.com/bitmagnet-io/bitmagnet/pull/264)
- Classifier runtime flags by
[@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/265](https://togithub.com/bitmagnet-io/bitmagnet/pull/265)
- Bump nokogiri from 1.16.4 to 1.16.5 in /bitmagnet.io by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/bitmagnet-io/bitmagnet/pull/256](https://togithub.com/bitmagnet-io/bitmagnet/pull/256)
- ENH: Classification result protobuf includes content id and source by
[@&#8203;rraymondgh](https://togithub.com/rraymondgh) in
[https://github.com/bitmagnet-io/bitmagnet/pull/266](https://togithub.com/bitmagnet-io/bitmagnet/pull/266)
- Add batch reprocessing queue job and 0.9.0 upgrade hook by
[@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/267](https://togithub.com/bitmagnet-io/bitmagnet/pull/267)
- Increase slow threshold by
[@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/268](https://togithub.com/bitmagnet-io/bitmagnet/pull/268)
- Don't track imported info hashes by
[@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/269](https://togithub.com/bitmagnet-io/bitmagnet/pull/269)
- Add sponsor links to web UI by
[@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/270](https://togithub.com/bitmagnet-io/bitmagnet/pull/270)
- Website updates by [@&#8203;mgdigital](https://togithub.com/mgdigital)
in
[https://github.com/bitmagnet-io/bitmagnet/pull/271](https://togithub.com/bitmagnet-io/bitmagnet/pull/271)
- Tweak build flags by
[@&#8203;mgdigital](https://togithub.com/mgdigital) in
[https://github.com/bitmagnet-io/bitmagnet/pull/272](https://togithub.com/bitmagnet-io/bitmagnet/pull/272)

#### New Contributors

- [@&#8203;Ewoodss](https://togithub.com/Ewoodss) made their first
contribution in
[https://github.com/bitmagnet-io/bitmagnet/pull/254](https://togithub.com/bitmagnet-io/bitmagnet/pull/254)
- [@&#8203;rraymondgh](https://togithub.com/rraymondgh) made their first
contribution in
[https://github.com/bitmagnet-io/bitmagnet/pull/266](https://togithub.com/bitmagnet-io/bitmagnet/pull/266)

**Full Changelog**:
bitmagnet-io/bitmagnet@v0.8.0...v0.9.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTkuMyIsInVwZGF0ZWRJblZlciI6IjM3LjM5OS4zIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImF1dG9tZXJnZSIsInVwZGF0ZS9kb2NrZXIvZ2VuZXJhbC9ub24tbWFqb3IiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant