Skip to content

[bug] updateMany does not proceed past first page #106

Closed

Description

@sl-at-ibm

When updateMany requires multiple requests, the "nextPageState" is read incorrectly from the first response and is always seen as null, thereby preventing any subsequent page from being properly processed.

As a result, only up to 50 (formerly 20) items get updated.

Root cause: the next page state is read from data rather than from status (where it is located).
This happens here in the updateMany collection method:

            if (res.getData() != null) {
                nextPageState = res.getData().getNextPageState();
            }

Reference response from a more-than-50-items updateMany HTTP request:

{
    "status": {
        "documentResponses": null,
        "sortVector": null,
        "warnings": null,
        "primaryKeySchema": null,
        "projectionSchema": null,
        "insertedIds": null,
        "moreData": true,
        "modifiedCount": 50,
        "matchedCount": 50,
        "nextPageState": "LQAAAAEBAAAAJDM3MGEwNzZkLTdiMzQtNDMxYS04YTA3LTZkN2IzNDAzMWE1MQDwf///zQA="
    },
    "data": null,
    "errors": null
}

Activity

  1. sl-at-ibm commented on Sep 17, 2026

    @sl-at-ibm
    ContributorAuthor

    Closed by #107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions