From 2eb19fa5e563c9065b126463ef9073cc8cdc8eb2 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Mon, 18 Jan 2021 23:33:51 -0700 Subject: [PATCH] Improve docs around bigtable read limit (#14660) --- 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 259aa20cbe..dd40ca3e72 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 3b23d34af4..cad9c19626 100644 --- a/storage-bigtable/src/lib.rs +++ b/storage-bigtable/src/lib.rs @@ -297,7 +297,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 @@ -371,7 +372,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,