Skip to content

Commit 8af14b5

Browse files
authored
[Remove cache] Fix concurrent issue (#6507)
Forgot to remove LRU_CACHE, this makes threads share same session of clickhouse-client, which should not allow. Error: ``` clickhouse Attempt to execute concurrent queries within the same session. Please use a separate client instance per thread/process. ```
1 parent 4cedc0d commit 8af14b5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

aws/lambda/oss_ci_job_queue_time/lambda_function.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,12 @@
2626
"CLICKHOUSE_USERNAME": os.getenv("CLICKHOUSE_USERNAME,"),
2727
}
2828

29-
_bucket_name = "ossci-raw-job-status"
3029

31-
32-
@lru_cache()
3330
def get_clickhouse_client(
3431
host: str, user: str, password: str
3532
) -> clickhouse_connect.driver.client.Client:
3633
# for local testing only, disable SSL verification
37-
return clickhouse_connect.get_client(
38-
host=host, user=user, password=password, secure=True, verify=False
39-
)
34+
# return clickhouse_connect.get_client(host=host, user=user, password=password, secure=True, verify=False)
4035

4136
return clickhouse_connect.get_client(
4237
host=host, user=user, password=password, secure=True

0 commit comments

Comments
 (0)