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

Migrated debezium perf to process executors; can send 500k msg/s now. #2067

Merged
merged 15 commits into from
Mar 4, 2022

Conversation

jcferretti
Copy link
Member

No description provided.

@jcferretti jcferretti added this to the Mar 2022 milestone Mar 3, 2022
@jcferretti jcferretti requested a review from cpwright March 3, 2022 23:26
@jcferretti jcferretti self-assigned this Mar 3, 2022
item_prices = None
def init_resources(kafka_only = False):
global producer, cursor, connection, item_prices
if not kafka_only:
Copy link
Contributor

Choose a reason for hiding this comment

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

There is still the cursor stuff on line 334 that I don't see gated by this.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you look at the initialization code for the executors, the purchases executor is initialized with init_resources(False), which means it will have a cursor. Line 334 using the global cursor is the purchases loop. So I believe this is fine; also, from output running there are no exceptions showing up for cursor being None.

# With python 3.10 we will be able to use parenthesis around
# 'with' with multiple 'as', and get rid
# of the backslashes.
with \
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need to have this gated on Kafka only?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is database initialization code in main; is independent of what the executors (which are separate processes) do.
The initialization code that gates on kafka is run on the forked sub-processes of the process pool executor.
I've changed the names of the methods and global variables that are executor specific to all start with executor_ in the hope that that makes it more clear.

@cpwright cpwright merged commit 67da46a into deephaven:main Mar 4, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants