Skip to content

Commit

Permalink
fix rocksdb for use with global tables or tables that use_partitioner (
Browse files Browse the repository at this point in the history
…#130)

* fix rocksdb use with global tables or tables that use_partitioner to produce to c
hangelog topics

* fix linting

* fix linting

Co-authored-by: alexanderoberegger <[email protected]>
  • Loading branch information
aoberegg and alexanderoberegger authored Apr 16, 2021
1 parent e5709b9 commit ec3ac3e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion faust/stores/rocksdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,12 @@ def _open_for_partition(self, partition: int) -> DB:

def _get(self, key: bytes) -> Optional[bytes]:
event = current_event()
if event is not None:
partition_from_message = (
event is not None
and not self.table.is_global
and not self.table.use_partitioner
)
if partition_from_message:
partition = event.message.partition
db = self._db_for_partition(partition)
value = db.get(key)
Expand Down

0 comments on commit ec3ac3e

Please sign in to comment.