Skip to content

Read stored objects page-by-page at startup#960

Open
benthecarman wants to merge 1 commit into
lightningdevkit:mainfrom
benthecarman:paginated-startup-reads
Open

Read stored objects page-by-page at startup#960
benthecarman wants to merge 1 commit into
lightningdevkit:mainfrom
benthecarman:paginated-startup-reads

Conversation

@benthecarman

Copy link
Copy Markdown
Contributor

read_all_objects previously fetched every key of a namespace in a single KVStore::list call, which can be expensive for large namespaces on remote backends like VSS. Now that all node stores implement PaginatedKVStore, list keys via list_paginated and read each page's objects with the existing bounded-concurrency batching. This covers the payment and pending payment stores read while building the node, and lays groundwork for reading stores lazily rather than loading them fully into memory.

`read_all_objects` previously fetched every key of a namespace in a
single `KVStore::list` call, which can be expensive for large
namespaces on remote backends like VSS. Now that all node stores
implement `PaginatedKVStore`, list keys via `list_paginated` and read
each page's objects with the existing bounded-concurrency batching.
This covers the payment and pending payment stores read while
building the node, and lays groundwork for reading stores lazily
rather than loading them fully into memory.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ldk-reviews-bot

ldk-reviews-bot commented Jul 2, 2026

Copy link
Copy Markdown

I've assigned @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@ldk-reviews-bot ldk-reviews-bot requested a review from tnull July 2, 2026 04:38

@tnull tnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll hold off on this one until we decided the more general questions w.r.t. pagination etc in #959.

@benthecarman benthecarman self-assigned this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants