-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FAB-11455 peer side changes to support pagination
We need to make necessary changes in the core/chaincode/handler.go for pagination of results. Currently, the handler.go in the peer calls the ledger to execute queries (range query, rich query) on behalf of the chaincode. On an execution of a query, the ledger returns an iterator. Using the iterator, peer constructs the query response with records and send the response to chaincode. This CR makes the following changes to support pagination of results. When a pagination of results is enabled for a query (i.e., when the query metadata is passed with either pageSize or a bookmark or both for range/rich queries), the peer would call the new pagination enabled range/rich query APIs at ledger which would return a response metadata in addition to an iterator. The response metadata would contain the next bookmark and the number of records fetched for the query. Peer retrieves all fetched records from ledger, constructs a query response including both records and response metadata. The chaincode can pass on the bookmark in the response metadata to the application/sdk. Change-Id: Id770dd184369d1f7eaa30f046e1923c8fde564a5 Signed-off-by: senthil <[email protected]> Signed-off-by: Chris Elder <[email protected]>
- Loading branch information
Showing
14 changed files
with
618 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.