Skip to content

Commit 2091326

Browse files
authored
Add improvements to documentation (#351)
* cleanup docs build process and add various improvements * fix formatting issue with aerospike on index.rst * add warning to globaltable.py docs * update rocksdb docs * fix linting
1 parent ba000ee commit 2091326

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

docs/reference/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Stores
128128
faust.stores.base
129129
faust.stores.memory
130130
faust.stores.rocksdb
131-
faust.stores.aerospike
131+
faust.stores.aerospike
132132

133133
Tables
134134
======

faust/stores/rocksdb.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ async def backup_partition(
232232
This is only supported in newer versions of python-rocksdb which can read
233233
the RocksDB database using multi-process read access.
234234
See https://github.com/facebook/rocksdb/wiki/How-to-backup-RocksDB to know more.
235+
236+
Example usage::
237+
238+
table = app.GlobalTable(..., partitions=1)
239+
table.data.backup_partition(0, flush=True, purge=True, keep=1)
240+
235241
"""
236242
if self._backup_engine:
237243
partition = tp
@@ -260,6 +266,11 @@ def restore_backup(
260266
latest: Restore the latest backup, set as False to restore a specific ID
261267
backup_id: Backup to restore
262268
269+
An example of how the method can be accessed::
270+
271+
table = app.GlobalTable(..., partitions=1)
272+
table.data.restore_backup(0)
273+
263274
"""
264275
if self._backup_engine:
265276
partition = tp

faust/tables/globaltable.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@
33

44

55
class GlobalTable(Table, GlobalTableT):
6+
"""
7+
.. warning::
8+
Using a GlobalTable with multiple app instances may cause an
9+
app to be stuck in an infinite recovery loop. The current fix
10+
for this is to run the table with the following options::
11+
12+
app.GlobalTable(..., partitions=1, recovery_buffer_size=1)
13+
"""
14+
615
pass

0 commit comments

Comments
 (0)