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 TASK_SCALE_WRITERS_MAX_WRITER_COUNT in test #18276

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

kokosing
Copy link
Member

Fix TASK_SCALE_WRITERS_MAX_WRITER_COUNT in test

If this session property is not fixed then running this locally most
likely will fail as number of writers depends on number of CPUs and so
expected number of created connections will be different.

@kokosing
Copy link
Member Author

It relates to #18005

@kokosing kokosing force-pushed the origin/master/154_fix-test branch from 32ad7a6 to 323f7b5 Compare July 13, 2023 13:19
@@ -61,7 +63,10 @@ protected void assertJdbcConnections(@Language("SQL") String query, int expected
assertQueryFails(query, errorMessage.get());
}
else {
getQueryRunner().execute(query);
Session querySession = Session.builder(getSession())
.setSystemProperty(TASK_SCALE_WRITERS_MAX_WRITER_COUNT, "4")
Copy link
Member

Choose a reason for hiding this comment

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

nit: add a comment

Copy link
Member Author

Choose a reason for hiding this comment

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

added

Copy link
Member

@gaurav8297 gaurav8297 Jul 13, 2023

Choose a reason for hiding this comment

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

@kokosing To disable scaling it might be better to set task_scale_writers_enabled to false.

https://trino.io/docs/current/admin/properties-writer-scaling.html#task-scale-writers-enabled

If this session property is not fixed then running this locally most
likely will fail as number of writers depends on number of CPUs and so
expected number of created connections will be different.
@kokosing kokosing force-pushed the origin/master/154_fix-test branch from 323f7b5 to 1844cd0 Compare July 13, 2023 13:29
Copy link
Member

@gaurav8297 gaurav8297 left a comment

Choose a reason for hiding this comment

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

Thanks!

@kokosing kokosing merged commit 1f2b34a into trinodb:master Jul 14, 2023
@kokosing kokosing deleted the origin/master/154_fix-test branch July 14, 2023 06:01
@github-actions github-actions bot added this to the 423 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants