Skip to content

Commit 9be3a8e

Browse files
authored
Destination redshift: delete unused spec option (#36365)
1 parent 4342182 commit 9be3a8e

File tree

5 files changed

+2
-86
lines changed

5 files changed

+2
-86
lines changed

airbyte-integrations/connectors/destination-redshift/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ data:
55
connectorSubtype: database
66
connectorType: destination
77
definitionId: f7a7d195-377f-cf5b-70a5-be6b819019dc
8-
dockerImageTag: 2.4.1
8+
dockerImageTag: 2.4.2
99
dockerRepository: airbyte/destination-redshift
1010
documentationUrl: https://docs.airbyte.com/integrations/destinations/redshift
1111
githubIssueLabel: destination-redshift

airbyte-integrations/connectors/destination-redshift/src/main/java/io/airbyte/integrations/destination/redshift/RedshiftStagingS3Destination.java

-30
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import static io.airbyte.integrations.destination.redshift.util.RedshiftUtil.findS3Options;
1313

1414
import com.fasterxml.jackson.databind.JsonNode;
15-
import com.google.common.annotations.VisibleForTesting;
1615
import io.airbyte.cdk.db.factory.DataSourceFactory;
1716
import io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase;
1817
import io.airbyte.cdk.db.jdbc.JdbcDatabase;
@@ -30,7 +29,6 @@
3029
import io.airbyte.cdk.integrations.destination.jdbc.typing_deduping.JdbcDestinationHandler;
3130
import io.airbyte.cdk.integrations.destination.jdbc.typing_deduping.JdbcSqlGenerator;
3231
import io.airbyte.cdk.integrations.destination.jdbc.typing_deduping.JdbcV1V2Migrator;
33-
import io.airbyte.cdk.integrations.destination.record_buffer.FileBuffer;
3432
import io.airbyte.cdk.integrations.destination.s3.AesCbcEnvelopeEncryption;
3533
import io.airbyte.cdk.integrations.destination.s3.AesCbcEnvelopeEncryption.KeyType;
3634
import io.airbyte.cdk.integrations.destination.s3.EncryptionConfig;
@@ -225,14 +223,6 @@ public SerializedAirbyteMessageConsumer getSerializedMessageConsumer(final JsonN
225223
: new NoEncryption();
226224
final JsonNode s3Options = findS3Options(config);
227225
final S3DestinationConfig s3Config = getS3DestinationConfig(s3Options);
228-
final int numberOfFileBuffers = getNumberOfFileBuffers(s3Options);
229-
if (numberOfFileBuffers > FileBuffer.SOFT_CAP_CONCURRENT_STREAM_IN_BUFFER) {
230-
LOGGER.warn("""
231-
Increasing the number of file buffers past {} can lead to increased performance but
232-
leads to increased memory usage. If the number of file buffers exceeds the number
233-
of streams {} this will create more buffers than necessary, leading to nonexistent gains
234-
""", FileBuffer.SOFT_CAP_CONCURRENT_STREAM_IN_BUFFER, catalog.getStreams().size());
235-
}
236226

237227
final String defaultNamespace = config.get("schema").asText();
238228
for (final ConfiguredAirbyteStream stream : catalog.getStreams()) {
@@ -287,26 +277,6 @@ public SerializedAirbyteMessageConsumer getSerializedMessageConsumer(final JsonN
287277
.createAsync();
288278
}
289279

290-
/**
291-
* Retrieves user configured file buffer amount so as long it doesn't exceed the maximum number of
292-
* file buffers and sets the minimum number to the default
293-
* <p>
294-
* NOTE: If Out Of Memory Exceptions (OOME) occur, this can be a likely cause as this hard limit has
295-
* not been thoroughly load tested across all instance sizes
296-
*
297-
* @param config user configurations
298-
* @return number of file buffers if configured otherwise default
299-
*/
300-
@VisibleForTesting
301-
public int getNumberOfFileBuffers(final JsonNode config) {
302-
int numOfFileBuffers = FileBuffer.DEFAULT_MAX_CONCURRENT_STREAM_IN_BUFFER;
303-
if (config.has(FileBuffer.FILE_BUFFER_COUNT_KEY)) {
304-
numOfFileBuffers = Math.min(config.get(FileBuffer.FILE_BUFFER_COUNT_KEY).asInt(), FileBuffer.MAX_CONCURRENT_STREAM_IN_BUFFER);
305-
}
306-
// Only allows for values 10 <= numOfFileBuffers <= 50
307-
return Math.max(numOfFileBuffers, FileBuffer.DEFAULT_MAX_CONCURRENT_STREAM_IN_BUFFER);
308-
}
309-
310280
private boolean isPurgeStagingData(final JsonNode config) {
311281
return !config.has("purge_staging_data") || config.get("purge_staging_data").asBoolean();
312282
}

airbyte-integrations/connectors/destination-redshift/src/main/resources/spec.json

-9
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,6 @@
223223
}
224224
],
225225
"order": 7
226-
},
227-
"file_buffer_count": {
228-
"title": "File Buffer Count",
229-
"type": "integer",
230-
"minimum": 10,
231-
"maximum": 50,
232-
"default": 10,
233-
"description": "Number of file buffers allocated for writing data. Increasing this number is beneficial for connections using Change Data Capture (CDC) and up to the number of streams within a connection. Increasing the number of file buffers past the maximum number of streams has deteriorating effects",
234-
"examples": ["10"]
235226
}
236227
}
237228
},

airbyte-integrations/connectors/destination-redshift/src/test-integration/java/io/airbyte/integrations/destination/redshift/RedshiftFileBufferTest.java

-41
This file was deleted.

docs/integrations/destinations/redshift.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ Optional parameters:
6969
`bucketPath/namespace/streamName/syncDate_epochMillis_randomUuid.csv` containing three columns
7070
(`ab_id`, `data`, `emitted_at`). Normally these files are deleted after the `COPY` command
7171
completes; if you want to keep them for other purposes, set `purge_staging_data` to `false`.
72-
- **File Buffer Count**
73-
- Number of file buffers allocated for writing data. Increasing this number is beneficial for
74-
connections using Change Data Capture (CDC) and up to the number of streams within a connection.
75-
Increasing the number of file buffers past the maximum number of streams has deteriorating
76-
effects.
7772

7873
NOTE: S3 staging does not use the SSH Tunnel option for copying data, if configured. SSH Tunnel
7974
supports the SQL connection only. S3 is secured through public HTTPS access only. Subsequent typing
@@ -247,6 +242,7 @@ Each stream will be output into its own raw table in Redshift. Each table will c
247242

248243
| Version | Date | Pull Request | Subject |
249244
| :------ | :--------- | :--------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
245+
| 2.4.2 | 2024-04-05 | [\#36365](https://github.com/airbytehq/airbyte/pull/36365) | Remove unused config option |
250246
| 2.4.1 | 2024-04-04 | [#36846](https://github.com/airbytehq/airbyte/pull/36846) | Remove duplicate S3 Region |
251247
| 2.4.0 | 2024-03-21 | [\#36589](https://github.com/airbytehq/airbyte/pull/36589) | Adapt to Kotlin cdk 0.28.19 |
252248
| 2.3.2 | 2024-03-21 | [\#36374](https://github.com/airbytehq/airbyte/pull/36374) | Supress Jooq DataAccessException error message in logs |

0 commit comments

Comments
 (0)