Skip to content

too many requests to amazon API #248

@amrnablus

Description

@amrnablus

Expected Behavior

A single request (or an appropriate number) should be made

Actual Behavior

A single call to findAll with a limit of 20 is loading the whole data set

Steps to Reproduce the Problem

  1. Create a repo
  2. Create a Bean and map it to whatever table (preferably with a large number of rows)
  3. make a call to findAll with a limit of say 10, and notice how the log shows a large number of requests.

Specifications

  • Spring Data DynamoDB Version: 5.1.0
  • Spring Data Version: 2.0.13.RELEASE
  • AWS SDK Version: 1.11.438
  • Java Version: 1.8.0_181
  • Platform Details: Ubuntu 18.04 LST

I tried to trace the problem and it seems a call to PaginatedScanList#size is causing this, isn't it possible to run two queries, one with count(*) and the actual query to get both the size and the needed data?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions