Skip to content

Setting a curation label via API takes long time #12399

@doigl

Description

@doigl

What steps does it take to reproduce the issue?
add a curation status label to a dataset (or delete one) via API call, when a valid set of curation labels is configured.

PUT api/datasets/{$DATASET-ID}/curationStatus?label={$MYLABEL}
DELETE api/datasets/{$DATASET-ID}/curationStatus

  • When does this issue occur?

It's only taking long time, if an existing curation label is deleted or a new curation label is set.

Getting the curation label or trying to set an already existing curation label is fast.

We identified the line of code, where the delay happens:

line 2159 in DatasetVersion.java (function addCurationStatus -> curationStatuses.add())

It seems to have something to do with the operation on the list of curationStatus objects and perhaps with the sorting.

  • Which page(s) does it occurs on?
    Via API

  • What happens?
    The API call takes several seconds and runs sometimes into an internal server error.

  • To whom does it occur (all users, curators, superusers)?
    all API-users

  • What did you expect to happen?

no internal server error, faster API call.

Which version of Dataverse are you using?
6.10.1

Any related open or closed issues to this bug report?
have not found any

Are you thinking about creating a pull request for this issue?
Help is always welcome, is this bug something you or your organization plan to fix?

If we find a way...

Identified together with @ffritze

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions