-
Notifications
You must be signed in to change notification settings - Fork 27
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
Migrate dynamic collection updater to Web Service mode #64
Comments
…d in release sup‐pages ☞ removing dynamic collection updater from release sub‐pages until it uses Web Service (#64)
This ticket would also fix dynamic updater on 10+ medium releases (#133). |
|
Blocked by: Release lookup web service recording-work relationships limit https://tickets.metabrainz.org/browse/MBS-11905
Work in progress blocked by MBS-11905: https://github.com/jesus2099/konami-command/commits/ws-dynamic-updater_issue-64 |
|
# On release browse endpoints in the webservice, we limit the number of
# releases returned such that the total number of tracks doesn't exceed this
# number.
sub WS_TRACK_LIMIT { 500 } |
=head1 SYNOPSIS
[…]
Releases with more than 500 recordings ignore 'recording-level-rels', and
since those recordings aren't dumped separately, their relationships will
only be included in the target entities' output. As of 2017-04, this affects
~200 releases.
[…]
=cut |
# The maximum number of recordings to try to get relationships for, if
# inc=recording-level-rels is specified. Certain releases with an enourmous
# number of recordings (audiobooks) will almost always timeout, driving up
# server load average for nothing. Ideally we can remove this limit as soon as
# we resolve the performance issues we have.
my $max_recording_relationships = 500; |
metabrainz/musicbrainz-server@cff9928
|
=head2 limit_releases_by_tracks
Truncates a list of releases such that the entire list doesn't contain more
than C<DBDefs::WS_TRACK_LIMIT> tracks in total (but returns at least one
release). The idea is to limit browse queries that contain an excessive number
of tracks when C<inc=recordings> is specified.
Note: This mutates the passed-in array reference C<$releases>.
=cut
sub limit_releases_by_tracks {
my ($self, $c, $releases) = @_;
my $track_count = 0;
my $release_count = 0;
for my $release (@{$releases}) {
$c->model('Medium')->load_for_releases($release);
$track_count += (sum map { $_->track_count } $release->all_mediums) // 0;
last if $track_count > DBDefs->WS_TRACK_LIMIT && $release_count > 0;
$release_count++;
}
@$releases = @$releases[0 .. ($release_count - 1)];
} |
One good thing is that there is a way to detect that I am on a release that has skipped
In fact it is very good and logical. |
Oh no, I lost my work in progress file, because of my recent official version (7854273) that triggered auto-update. |
So MBS-11905 is not really blocking this. |
Browsing web service JSON responses is also a lot of fine-tuning! so I will try my utmost to reuse the existing functions from initial loading #174, rather than keeping a specific dynamic loader loading. |
Dynamic remove not being converted to new mode, included release groups are not removed with dynamic remove (OFF or remove from collection). |
The text was updated successfully, but these errors were encountered: