-
Notifications
You must be signed in to change notification settings - Fork 40
Reduce the number of concurrent DDLs from 10 to 1 for Cosmos DB in the integration tests #1920
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
Conversation
feeblefakie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
Torch3333
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
| } | ||
|
|
||
| @Override | ||
| protected int getThreadNum() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we override the isParallelDdlSupported() method instead of this? Or we might be able to remove the isParallelDdlSupported() method and use getThreadNum() instead for the sake of consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brfrn169 Good point! Actually I noticed the same and created a branch to remove executeDdls() and isParallelDdlSupported() a17d246.
I'll create a PR with the change for only branches 3 and master that contain those unnecessary methods (reducing concurrency for Cosmos DB integration test is needed for all the release and support branches)
|
@komamitsu Also, maybe, we can override |
@brfrn169 I'll remove the method later as a separate PR since the method doesn't exist in older branches than |
|
@komamitsu Sorry, I checked the source code again. It seems like |
|
@brfrn169 Ah, you're right. I didn't notice the I'm wondering what is the purpose of concurrently issuing the DML operations in the test class. If it's to reduce the integration test duration, I noticed the total duration wasn't increased with a single thread and we don't need
With 10 threads: If the concurrent DML operations are needed to see if things work fine even under multi-threads, we need to separate the concurrencies for DDL and DML by introducing |
However, separating the concurrencies for DDL and DML might be always helpful for flexible tuning. Let me know if you think we should add |
Actually, I don't remember the reasons.
If it doesn't affect the integration test duration for all the storages, we can execute the DDLs in a single thread. Could you please check that? Thanks. |
Oh, I didn't talked about other storages at all, but only Cosmos DB. My understanding is as follows:
Okay. I can port |
Sounds good. Thank you! |
via isParallelDdlSupported() instead of getThreadNum()
brfrn169
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
…e integration tests (#1920) Co-authored-by: Toshihiro Suzuki <brfrn169@gmail.com>
…e integration tests (#1920) Co-authored-by: Toshihiro Suzuki <brfrn169@gmail.com>
Description
After merging #1909, we observed the integration test often failed with the Cosmos DB emulator due to failing to create a namespace.
scalardb/integration-test/src/main/java/com/scalar/db/api/DistributedStorageCrossPartitionScanIntegrationTestBase.java
Line 165 in 6d43a36
I noticed
CosmosCrossPartitionScanIntegrationTestused the default thread number (10). So, this PR limits it to 1 as well as other tests.Related issues and/or PRs
Changes made
CosmosCrossPartitionScanIntegrationTestfrom 10 to 3Checklist
Additional notes (optional)
maxParallelForksto 2 or 3 later.Release notes
N/A