Skip to content

Commit 6215ea1

Browse files
tmp: tuning knobs
1 parent 3033c27 commit 6215ea1

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

airbyte-integrations/connectors/destination-mssql-v2/src/main/kotlin/io/airbyte/integrations/destination/mssql/v2/MSSQLBulkLoader.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ class MSSQLBulkLoaderFactory(
109109
private val bulkLoadConfig: MSSQLBulkLoadConfiguration,
110110
private val streamStateStore: StreamStateStore<MSSQLStreamState>
111111
) : BulkLoaderFactory<StreamKey, AzureBlob> {
112-
override val numPartWorkers: Int = 2
113-
override val numUploadWorkers: Int = 10
112+
override val numPartWorkers: Int = config.numProcessRecordsWorkers
113+
override val numUploadWorkers: Int = config.numProcessBatchWorkers
114114
override val maxNumConcurrentLoads: Int = 1
115115

116116
override val objectSizeBytes: Long = 200 * 1024 * 1024

airbyte-integrations/connectors/destination-mssql-v2/src/main/kotlin/io/airbyte/integrations/destination/mssql/v2/config/MSSQLConfiguration.kt

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ data class MSSQLConfiguration(
2222
val jdbcUrlParams: String?,
2323
val sslMethod: EncryptionMethod,
2424
override val mssqlLoadTypeConfiguration: MSSQLLoadTypeConfiguration,
25-
) : DestinationConfiguration(), MSSQLLoadTypeConfigurationProvider {
26-
override val numProcessRecordsWorkers = 1
25+
override val numProcessRecordsWorkers: Int = 1,
2726
override val numProcessBatchWorkers: Int = 1
27+
) : DestinationConfiguration(), MSSQLLoadTypeConfigurationProvider {
2828
override val processEmptyFiles: Boolean = true
2929
override val recordBatchSizeBytes = ObjectStorageUploadConfiguration.DEFAULT_PART_SIZE_BYTES
3030
}
@@ -58,7 +58,9 @@ class MSSQLConfigurationFactory(private val featureFlags: Set<FeatureFlag>) :
5858
password = overrides.getOrDefault("password", spec.password),
5959
jdbcUrlParams = overrides.getOrDefault("jdbcUrlParams", spec.jdbcUrlParams),
6060
sslMethod = spec.sslMethod,
61-
mssqlLoadTypeConfiguration = spec.toLoadConfiguration()
61+
mssqlLoadTypeConfiguration = spec.toLoadConfiguration(),
62+
numProcessRecordsWorkers = spec.numPartWorkers ?: 2,
63+
numProcessBatchWorkers = spec.numObjectLoaders ?: 10
6264
)
6365
}
6466
}

airbyte-integrations/connectors/destination-mssql-v2/src/main/kotlin/io/airbyte/integrations/destination/mssql/v2/config/MSSQLSpecification.kt

+6
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ class MSSQLSpecification : ConfigurationSpecification(), LoadTypeSpecification {
7878
@get:JsonProperty("load_type")
7979
@get:JsonSchemaInject(json = """{"always_show": true,"order":8}""")
8080
override val loadType: LoadType = InsertLoadSpecification()
81+
82+
@get:JsonProperty("numPartWorkers")
83+
val numPartWorkers: Int? = null
84+
85+
@get:JsonProperty("numObjectLoaders")
86+
val numObjectLoaders: Int? = null
8187
}
8288

8389
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "name")

0 commit comments

Comments
 (0)