Skip to content

Commit

Permalink
Add improvements to documentation (#351)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
wbarnha authored Sep 4, 2022
1 parent ba000ee commit 2091326
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Stores
faust.stores.base
faust.stores.memory
faust.stores.rocksdb
faust.stores.aerospike
faust.stores.aerospike

Tables
======
Expand Down
11 changes: 11 additions & 0 deletions faust/stores/rocksdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ async def backup_partition(
This is only supported in newer versions of python-rocksdb which can read
the RocksDB database using multi-process read access.
See https://github.com/facebook/rocksdb/wiki/How-to-backup-RocksDB to know more.
Example usage::
table = app.GlobalTable(..., partitions=1)
table.data.backup_partition(0, flush=True, purge=True, keep=1)
"""
if self._backup_engine:
partition = tp
Expand Down Expand Up @@ -260,6 +266,11 @@ def restore_backup(
latest: Restore the latest backup, set as False to restore a specific ID
backup_id: Backup to restore
An example of how the method can be accessed::
table = app.GlobalTable(..., partitions=1)
table.data.restore_backup(0)
"""
if self._backup_engine:
partition = tp
Expand Down
9 changes: 9 additions & 0 deletions faust/tables/globaltable.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@


class GlobalTable(Table, GlobalTableT):
"""
.. warning::
Using a GlobalTable with multiple app instances may cause an
app to be stuck in an infinite recovery loop. The current fix
for this is to run the table with the following options::
app.GlobalTable(..., partitions=1, recovery_buffer_size=1)
"""

pass

0 comments on commit 2091326

Please sign in to comment.