Ticket #206 (closed enhancement: fixed)

Opened 4 years ago

Last modified 2 years ago

/collection problem

Reported by: Michiel.Schok Owned by: robert
Priority: major Milestone: MediaMosa 2.3
Component: Core Version:
Keywords: Cc:
MoSCoW: Must Have Estimated time after impact analysis:
Related to project: none Tested: yes
Accepted: yes Estimated Hours: 16

Description

In the /collection results, the total number of assets per collection is given in the <numofvideos> element.

<request_uri>[GET] collection?limit=3</request_uri>
...
 <items>
    <item id="1">
      <coll_id>MXxvBAAhJzEhEboFK7pp9sVd</coll_id>
   ...
      <numofvideos>1</numofvideos>
    </item>
  </items>

If this collection is slaved to another application, it appears in their results with the same amount of videos.
But.... if only a subset of the videos contain mediafiles that are slaved to the same application, a subsequent

/collection/{id}/asset call can report quite different numbers.

At the moment (nov 18th 2009), at the Core staging environment, we observe that certain NIBG collections contain hundreds or thousands of assets using the /collection?title=acad&limit=20 call.

When we look into the collections and request the asset list using /collection/{id}/asset?limit=10 the collections appear empty (no assets found).

On Core production, there is a discrepancy of about 30 assets between certain collections (758 with 20k+ assets).

This behaviour is 'by design', but hardly documented. If master/slave gets an overhaul, maybe this kind of behaviour can be changed.

Change History

Changed 3 years ago by Frans

  • moscow set to Should Have
  • milestone changed from MediaMosa X.X to MediaMosa 2.1

master/slave related

Changed 3 years ago by Frans

  • milestone changed from MediaMosa 2.1 to MediaMosa 2.2

Changed 3 years ago by Michiel.Schok

Another difference we have detected between the <numofvidoes> and the number of videos returned on a /collection/{id}/asset call is because of potential empty assets.
These are always counted in the /collection result (no way / no parameter to hide them), and are hidden (using &hide_empty_assets=TRUE) in the /collection/{id}/asset.

See SURFmedia Mantis 3005 ( https://mantis.surfnet.nl/view.php?id=3005) for examples, screenshots and details...

Changed 3 years ago by Frans

  • moscow changed from Should Have to Must Have
  • milestone changed from MediaMosa 2.2 to MediaMosa 2.3

Changed 3 years ago by peter

  • estimated_hours set to 16

Changed 3 years ago by robert

  • owner set to michiel
  • status changed from new to assigned

Michiel;

I have implemented the correct master-slave solution to /collection and now does indeed return correct values in the numofvidoes field based on the masterslave access of the assets inside the master-slaved collections.

The only difference now is that a side effect is happening on master-slaved collections and I need your opinion about it.

In the old situation, when you master-slaved a collection that was empty and you did a normal search, the empty master-slaved collection would show up in the result with numofvideos = 0.

Now in the new situation, any master-slaved collections with videos and having no access to any of the videos in the master-slaved collection will not be included in the search result. This is a side-effect I don't see I can fix.

So in short; if you master-slave a collection to your app (allowing access to the collection) and none of the asset's mediafiles are master-slaved to your app, the collection will not end up in /collection search call.

Changed 3 years ago by robert

  • owner changed from michiel to Michiel.Schok

Changed 3 years ago by Michiel.Schok

  • owner changed from Michiel.Schok to robert

Robert,

So in short; if you master-slave a collection to your app (allowing access to the collection) and none of the asset's mediafiles are master-slaved to your app, the collection will not end up in /collection search call.

I would call this a positive side-effect from an user-perspective, but of course, it is possible that this behaviour appears strange to a new user which is starting to use master/slave. If it is documented clearly, I would welcome this change.
In the documentation on the /collection/acl call there could be some text about this behaviour.

SURFmedia says: "go!"

Changed 3 years ago by robert

  • status changed from assigned to closed
  • resolution set to fixed

Changed 2 years ago by Michiel.Schok

  • tested set to yes
  • accepted changed from no to yes

This looks allright.

Note: See TracTickets for help on using tickets.