Skip to content

Commit 49c48ed

Browse files
committed
Clean up debug logging from ClickHouse 25.10 investigation
- Remove connection monitoring and query progress logging from HashSuite - Remove detailed query timing logs from NodeClient - Tests now pass with ClickHouse 25.10 (latest) without workarounds
1 parent 74f6fd1 commit 49c48ed

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

clickhouse-core-it/src/test/scala/com/clickhouse/spark/HashSuite.scala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,8 @@ abstract class HashSuite extends AnyFunSuite with ClickHouseProvider with Loggin
6464
(testElement.combinations(1) ++ testElement.combinations(2) ++ testElement.combinations(3)).toArray
6565

6666
test("CityHash64 Java implementation") {
67-
log.info(s"[HashSuite] Starting CityHash64 test with ${testInputs.length} test inputs")
6867
withNodeClient() { client =>
69-
var queryCount = 0
7068
testInputs.foreach { testInput =>
71-
queryCount += 1
72-
if (queryCount % 10 == 0) {
73-
log.info(s"[HashSuite] CityHash64: Completed $queryCount/${testInputs.length} queries")
74-
}
7569
val clickhouseInputExpr = testInput.mkString("'", "', '", "'")
7670
testHash(
7771
client,
@@ -81,7 +75,6 @@ abstract class HashSuite extends AnyFunSuite with ClickHouseProvider with Loggin
8175
clickhouseInputExpr
8276
)
8377
}
84-
log.info(s"[HashSuite] CityHash64 test completed: $queryCount queries executed")
8578
}
8679
}
8780

clickhouse-core/src/main/scala/com/clickhouse/spark/client/NodeClient.scala

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -199,27 +199,16 @@ class NodeClient(val nodeSpec: NodeSpec) extends AutoCloseable with Logging {
199199
settings: Map[String, String]
200200
): Either[CHException, SimpleOutput[OUT]] = {
201201
val queryId = nextQueryId()
202-
val startTime = System.currentTimeMillis()
203-
log.info(s"[NodeClient] Starting query $queryId to ${nodeSpec.host}:${nodeSpec.port}")
204202
onExecuteQuery(queryId, sql)
205203
val querySettings: QuerySettings = new QuerySettings()
206204
val clickHouseFormat = ClickHouseFormat.valueOf(outputFormat)
207205
querySettings.setFormat(clickHouseFormat)
208206
querySettings.setQueryId(queryId)
209207
settings.foreach { case (k, v) => querySettings.setOption(k, v) }
210208
Try(clientV2.query(sql, querySettings).get(timeout, TimeUnit.MILLISECONDS)) match {
211-
case Success(response: QueryResponse) =>
212-
val duration = System.currentTimeMillis() - startTime
213-
log.info(s"[NodeClient] Query $queryId completed successfully in ${duration}ms")
214-
Right(deserializer(response.getInputStream))
215-
case Failure(se: ServerException) =>
216-
val duration = System.currentTimeMillis() - startTime
217-
log.error(s"[NodeClient] Query $queryId failed with ServerException after ${duration}ms: ${se.getMessage}")
218-
Left(CHServerException(se.getCode, se.getMessage, Some(nodeSpec), Some(se)))
219-
case Failure(ex: Exception) =>
220-
val duration = System.currentTimeMillis() - startTime
221-
log.error(s"[NodeClient] Query $queryId failed with ${ex.getClass.getSimpleName} after ${duration}ms: ${ex.getMessage}")
222-
Left(CHClientException(ex.getMessage, Some(nodeSpec), Some(ex)))
209+
case Success(response: QueryResponse) => Right(deserializer(response.getInputStream))
210+
case Failure(se: ServerException) => Left(CHServerException(se.getCode, se.getMessage, Some(nodeSpec), Some(se)))
211+
case Failure(ex: Exception) => Left(CHClientException(ex.getMessage, Some(nodeSpec), Some(ex)))
223212
}
224213
}
225214

0 commit comments

Comments
 (0)