Skip to content

Commit fafc6ec

Browse files
Reduce m365 worker thread count from 7 to 2 (#6103)
This commit reduces the m365 worker thread count from 7 to 2. This is because the worker thread is per host and we need to ensure there are not too many threads in total to avoid api throttling. The suggestion is to estimate based on 2 ~ 4 OCU. Original 7 is the estimated based on total threads. Changing to 2 would fit for 4 OCU. Signed-off-by: Wenjie Yao <[email protected]> Co-authored-by: Wenjie Yao <[email protected]>
1 parent 74824b3 commit fafc6ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

data-prepper-plugins/saas-source-plugins/microsoft-office365-source/src/main/java/org/opensearch/dataprepper/plugins/source/microsoft_office365/Office365SourceConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
@Getter
2323
public class Office365SourceConfig implements CrawlerSourceConfig {
24-
private static final int NUMBER_OF_WORKERS = 7;
24+
private static final int NUMBER_OF_WORKERS = 2;
2525

2626
/**
2727
* The Office 365 tenant ID that uniquely identifies the Microsoft Entra organization.

data-prepper-plugins/saas-source-plugins/microsoft-office365-source/src/test/java/org/opensearch/dataprepper/plugins/source/microsoft_office365/Office365SourceConfigTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ void testDefaultValues() throws Exception {
5757
Office365SourceConfig config = createConfig();
5858

5959
assertFalse(config.isAcknowledgments());
60-
assertEquals(7, config.getNumberOfWorkers());
60+
assertEquals(2, config.getNumberOfWorkers());
6161
}
6262
}

0 commit comments

Comments
 (0)