Skip to content

Commit ec3ac3e

Browse files
aobereggalexanderoberegger
andauthored
fix rocksdb for use with global tables or tables that use_partitioner (#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 <alexander.oberegger@smaxtec.com>
1 parent e5709b9 commit ec3ac3e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

faust/stores/rocksdb.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,12 @@ def _open_for_partition(self, partition: int) -> DB:
289289

290290
def _get(self, key: bytes) -> Optional[bytes]:
291291
event = current_event()
292-
if event is not None:
292+
partition_from_message = (
293+
event is not None
294+
and not self.table.is_global
295+
and not self.table.use_partitioner
296+
)
297+
if partition_from_message:
293298
partition = event.message.partition
294299
db = self._db_for_partition(partition)
295300
value = db.get(key)

0 commit comments

Comments
 (0)