Skip to content

Commit a1f8d22

Browse files
authored
[Destination MSSQL] rc7: revert deletion logic change (#53644)
1 parent 35bc80a commit a1f8d22

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

airbyte-integrations/connectors/destination-mssql-v2/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ data:
1616
type: GSM
1717
connectorType: destination
1818
definitionId: 37a928c1-2d5c-431a-a97d-ae236bd1ea0c
19-
dockerImageTag: 0.1.8
19+
dockerImageTag: 0.1.9
2020
dockerRepository: airbyte/destination-mssql-v2
2121
documentationUrl: https://docs.airbyte.com/integrations/destinations/mssql-v2
2222
githubIssueLabel: destination-mssql-v2

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,22 +157,16 @@ const val ALTER_TABLE_MODIFY =
157157

158158
const val DELETE_WHERE_COL_IS_NOT_NULL =
159159
"""
160-
deleteLoop:
161-
DELETE TOP(5000) FROM [?].[?] WITH (TABLOCK)
160+
SET NOCOUNT ON;
161+
DELETE FROM [?].[?] WITH (TABLOCK)
162162
WHERE [?] is not NULL
163-
164-
IF @@ROWCOUNT > 0
165-
GOTO deleteLoop
166163
"""
167164

168165
const val DELETE_WHERE_COL_LESS_THAN =
169166
"""
170-
deleteLoop:
171-
DELETE TOP(5000) FROM [?].[?] WITH (TABLOCK)
167+
SET NOCOUNT ON;
168+
DELETE FROM [?].[?] WITH (TABLOCK)
172169
WHERE [?] < ?
173-
174-
IF @@ROWCOUNT > 0
175-
GOTO deleteLoop
176170
"""
177171

178172
const val SELECT_FROM = """

docs/integrations/destinations/mssql-v2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This connector is in early access, and SHOULD NOT be used for production workloa
1313

1414
| Version | Date | Pull Request | Subject |
1515
|:--------|:-----------|:-----------------------------------------------------------|:-----------------------------------------------------|
16+
| 0.1.9 | 2025-02-11 | [53364](https://github.com/airbytehq/airbyte/pull/53364) | RC7: Revert deletion change. |
1617
| 0.1.8 | 2025-02-11 | [53364](https://github.com/airbytehq/airbyte/pull/53364) | RC6: Break up deletes into loop to reduce locking. |
1718
| 0.1.7 | 2025-02-07 | [53236](https://github.com/airbytehq/airbyte/pull/53236) | RC5: Use rowlock hint. |
1819
| 0.1.6 | 2025-02-06 | [53192](https://github.com/airbytehq/airbyte/pull/53192) | RC4: Fix config, timehandling and performance tweak. |

0 commit comments

Comments
 (0)