IQSS / IQSS/dataverse

/api/notifications/all fails for user with large notification volume (e.g., dataverseAdmin)

Open
#11,683 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

Bug Report: /api/notifications/all fails for user with large notification volume

Environment

  • Branch: develop (latest as of July 2025)
  • User: dataverseAdmin (has thousands of notifications)
  • Tested during: PR testing for #11664
  • API Call:
    curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all"
    
    

Bug Description
The /api/notifications/all endpoint fails when invoked by a user who has a very large volume of notifications. This issue was discovered while testing PR #11664, but it exists in the develop branch independently of that PR.

Steps to Reproduce
Log in as a superuser or admin account with thousands of notifications (e.g., dataverseAdmin)

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all"
Observe that the API call fails (e.g., no response or internal server error)

Expected Behavior
The API call should return the user's notifications, or at least respond with a subset (paginated or filtered), without crashing or timing out.

Actual Behavior
The request fails entirely

**

11664 server.log

**
Relevant stack trace is available in the server.log from internal testing.

Notes
This is not a regression introduced by PR #11664

Suggested Fix
Add pagination support to /api/notifications/all
Add filtering options (e.g., ?type=..., ?since=...)
Enforce maximum limits and document default behavior for large volumes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the /api/notifications/all entry point and reproduce the failure using the curl command for an account with thousands of notifications. Review the linked server.log for the relevant stack trace and determine the response limits or pagination behavior needed. Done means the endpoint returns a bounded notification result without crashing or timing out.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.