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

Change RocksDB to check the assigned topic name #655

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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 @@ -393,7 +393,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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this a function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the underscore version is. The non-underscore version is an @property

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 t/unit/stores/test_rocksdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,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),
TP('clog', 2),
Expand Down