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

Add test for concurrent access on connection #138

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

Nicoretti
Copy link
Member

No description provided.

def run(self):
try:
# run heavy query
self.connection.execute("SELECT * FROM users a, users b, users c, payments d")
Copy link

Choose a reason for hiding this comment

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

Could the query be simplified?
Or is there a specific reason for querying table users 3 times?

Copy link
Member Author

Choose a reason for hiding this comment

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

took this from the original example, see comment above.
I assume this shall make sure query does take long enough for the second attempt.
Maybe it can be done with a sleep, I'll try.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Previously "sleep" UDFs did not work well with abort_query() call. Usually it caused an entire connection to be terminated.

Copy link
Member Author

@Nicoretti Nicoretti Jun 20, 2024

Choose a reason for hiding this comment

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

@littleK0i from what I have seen with Exasol >= 7.1, sleep works fine.
With this information which query would you prefer and why?

@Nicoretti Nicoretti force-pushed the test/add-concurrency-test-case branch from c8b1f80 to 1eece36 Compare June 20, 2024 13:05
@Nicoretti Nicoretti requested review from ckunki and littleK0i June 20, 2024 13:23
@Nicoretti Nicoretti merged commit f730bb9 into master Jun 21, 2024
10 checks passed
@Nicoretti Nicoretti deleted the test/add-concurrency-test-case branch June 21, 2024 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants