Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iterating over keys when changelog topic is set. #106

Merged
merged 4 commits into from
Feb 27, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion faust/stores/rocksdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def _dbs_for_key(self, key: bytes) -> Iterable[DB]:

def _dbs_for_actives(self) -> Iterator[DB]:
actives = self.app.assignor.assigned_actives()
topic = self.table._changelog_topic_name()
topic = self.table.changelog_topic_name
for partition, db in self._dbs.items():
tp = TP(topic=topic, partition=partition)
# for global tables, keys from all
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/stores/test_rocksdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def test__dbs_for_key(self, *, store):
assert list(store._dbs_for_key(b"key")) == [dbs[2]]

def test__dbs_for_actives(self, *, store, table):
table._changelog_topic_name.return_value = "clog"
table.changelog_topic_name = "clog"
store.app.assignor.assigned_actives = Mock(
return_value=[
TP("clog", 1),
Expand Down