From 9054f6415326006ad9996bd230d7d7215fd7ef45 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Thu, 4 May 2023 11:45:08 +0200 Subject: [PATCH] Document ConnectorSplitSource thread-safety requirements Note that some existing implementations are not thread-safe. For example `IcebergSplitSource.scannedFiles` is accessed without any synchronization. --- .../java/io/trino/spi/connector/ConnectorSplitSource.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplitSource.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplitSource.java index 87a964099cb2..04bbba0cde6b 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplitSource.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorSplitSource.java @@ -20,6 +20,11 @@ import static java.util.Objects.requireNonNull; +/** + * Source of splits to be processed. + *

+ * Thread-safety: the implementations are not required to be thread-safe. + */ public interface ConnectorSplitSource extends Closeable {