diff --git a/connector/src/main/java/io/pixelsdb/pixels/trino/PixelsPageSource.java b/connector/src/main/java/io/pixelsdb/pixels/trino/PixelsPageSource.java index 89ebe4a..fcdec6b 100644 --- a/connector/src/main/java/io/pixelsdb/pixels/trino/PixelsPageSource.java +++ b/connector/src/main/java/io/pixelsdb/pixels/trino/PixelsPageSource.java @@ -385,7 +385,7 @@ public Page getNextPage() return getNextPage(); } else { - close(); + this.close(); return null; } } @@ -425,7 +425,7 @@ public Page getNextPage() return getNextPage(); } else { - close(); + this.close(); return null; } } @@ -442,6 +442,7 @@ public Page getNextPage() @Override public void close() { + // PIXELS-403: page source is not accessed by multiple threads, there is no need to synchronize on this method. if (closed) { return; @@ -457,6 +458,9 @@ public void close() closed = true; } + /** + * Close the current pixels reader without closing this page source. + */ private void closeReader() { try