diff --git a/airbyte-integrations/bases/base-java/src/main/java/io/airbyte/integrations/destination/buffered_stream_consumer/BufferedStreamConsumer.java b/airbyte-integrations/bases/base-java/src/main/java/io/airbyte/integrations/destination/buffered_stream_consumer/BufferedStreamConsumer.java index 71bd8f110ef2..9a98616a3396 100644 --- a/airbyte-integrations/bases/base-java/src/main/java/io/airbyte/integrations/destination/buffered_stream_consumer/BufferedStreamConsumer.java +++ b/airbyte-integrations/bases/base-java/src/main/java/io/airbyte/integrations/destination/buffered_stream_consumer/BufferedStreamConsumer.java @@ -146,7 +146,7 @@ protected void acceptTracked(final AirbyteMessage message) throws Exception { // TODO use a more efficient way to compute bytes that doesn't require double serialization (records // are serialized again when writing to // the destination - long messageSizeInBytes = ByteUtils.getSizeInBytes(Jsons.serialize(recordMessage.getData())); + final long messageSizeInBytes = ByteUtils.getSizeInBytes(Jsons.serialize(recordMessage.getData())); if (bufferSizeInBytes + messageSizeInBytes >= maxQueueSizeInBytes) { flushQueueToDestination(); bufferSizeInBytes = 0; @@ -202,7 +202,7 @@ protected void close(final boolean hasFailed) throws Exception { } try { - // if no state was was emitted (i.e. full refresh), if there were still no failures, then we can + // if no state was emitted (i.e. full refresh), if there were still no failures, then we can // still succeed. if (lastFlushedState == null) { onClose.accept(hasFailed); @@ -211,7 +211,7 @@ protected void close(final boolean hasFailed) throws Exception { onClose.accept(false); } - // if one close succeeds without exception then we can emit the state record because it means its + // if onClose succeeds without exception then we can emit the state record because it means its // records were not only flushed, but committed. if (lastFlushedState != null) { outputRecordCollector.accept(lastFlushedState); diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationHandler.java b/airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationHandler.java index 5107d5d9db04..b8fc5ac489d7 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationHandler.java @@ -101,7 +101,7 @@ public void deleteDestination(final DestinationIdRequestBody destinationIdReques public void deleteDestination(final DestinationRead destination) throws JsonValidationException, IOException, ConfigNotFoundException { // disable all connections associated with this destination - // Delete connections first in case it it fails in the middle, destination will still be visible + // Delete connections first in case it fails in the middle, destination will still be visible final WorkspaceIdRequestBody workspaceIdRequestBody = new WorkspaceIdRequestBody().workspaceId(destination.getWorkspaceId()); for (final ConnectionRead connectionRead : connectionsHandler.listConnectionsForWorkspace(workspaceIdRequestBody).getConnections()) { if (!connectionRead.getDestinationId().equals(destination.getDestinationId())) { diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/SourceHandler.java b/airbyte-server/src/main/java/io/airbyte/server/handlers/SourceHandler.java index e5e36483fea0..8cd3be154581 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/SourceHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/handlers/SourceHandler.java @@ -157,7 +157,7 @@ public void deleteSource(final SourceIdRequestBody sourceIdRequestBody) public void deleteSource(final SourceRead source) throws JsonValidationException, IOException, ConfigNotFoundException { // "delete" all connections associated with source as well. - // Delete connections first in case it it fails in the middle, source will still be visible + // Delete connections first in case it fails in the middle, source will still be visible final WorkspaceIdRequestBody workspaceIdRequestBody = new WorkspaceIdRequestBody() .workspaceId(source.getWorkspaceId()); for (final ConnectionRead connectionRead : connectionsHandler @@ -170,10 +170,7 @@ public void deleteSource(final SourceRead source) } final ConnectorSpecification spec = getSpecFromSourceId(source.getSourceId()); - validateSource(spec, source.getConnectionConfiguration()); - final var fullConfig = configRepository.getSourceConnectionWithSecrets(source.getSourceId()).getConfiguration(); - validateSource(spec, fullConfig); // persist persistSourceConnection(