From cd8c12c749b1687715ebd86921ad8e4a40250a84 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 19 Jan 2021 08:02:08 +0000 Subject: [PATCH] Improve docs around bigtable read limit (#14660) (#14661) (cherry picked from commit 2eb19fa5e563c9065b126463ef9073cc8cdc8eb2) Co-authored-by: Tyera Eulberg --- storage-bigtable/src/bigtable.rs | 6 ++++-- storage-bigtable/src/lib.rs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/storage-bigtable/src/bigtable.rs b/storage-bigtable/src/bigtable.rs index a0ac3e7336..27caab5304 100644 --- a/storage-bigtable/src/bigtable.rs +++ b/storage-bigtable/src/bigtable.rs @@ -313,7 +313,8 @@ impl BigTable { /// Otherwise the listing will start from the start of the table. /// /// If `end_at` is provided, the row key listing will end at the key. Otherwise it will - /// continue until the `limit` is reached or the end of the table, whichever comes first. + /// continue until the `rows_limit` is reached or the end of the table, whichever comes first. + /// If `rows_limit` is zero, the listing will continue until the end of the table. pub async fn get_row_keys( &mut self, table_name: &str, @@ -374,7 +375,8 @@ impl BigTable { /// of the table. /// /// If `end_at` is provided, the row key listing will end at the key. Otherwise it will - /// continue until the `limit` is reached or the end of the table, whichever comes first. + /// continue until the `rows_limit` is reached or the end of the table, whichever comes first. + /// If `rows_limit` is zero, the listing will continue until the end of the table. pub async fn get_row_data( &mut self, table_name: &str, diff --git a/storage-bigtable/src/lib.rs b/storage-bigtable/src/lib.rs index 339624a7ef..0e17d3956d 100644 --- a/storage-bigtable/src/lib.rs +++ b/storage-bigtable/src/lib.rs @@ -295,7 +295,8 @@ impl LedgerStorage { /// Fetch the next slots after the provided slot that contains a block /// /// start_slot: slot to start the search from (inclusive) - /// limit: stop after this many slots have been found. + /// limit: stop after this many slots have been found; if limit==0, all records in the table + /// after start_slot will be read pub async fn get_confirmed_blocks(&self, start_slot: Slot, limit: usize) -> Result> { let mut bigtable = self.connection.client(); let blocks = bigtable @@ -369,7 +370,8 @@ impl LedgerStorage { /// /// address: address to search for /// before_signature: start with the first signature older than this one - /// limit: stop after this many signatures. + /// until_signature: end with the last signature more recent than this one + /// limit: stop after this many signatures; if limit==0, all records in the table will be read pub async fn get_confirmed_signatures_for_address( &self, address: &Pubkey,