Skip to content

Commit 4319854

Browse files
committed
failing without cxonnection close
1 parent 0b6ec3c commit 4319854

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/module-api/src/kmip_post.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import json
21
import requests
32
from client_configuration import ClientConfiguration
43

@@ -24,11 +23,9 @@ def kmip_post(
2423
# see this for user facing the same issue:
2524
# https://snowflake.discourse.group/t/i-have-a-stored-procedure-that-utilizes-a-network-access-rules-to-make-external-calls-that-was-working-flawlessly-for-months-and-without-any-change-in-the-code-im-getting-oserror-errno-99-cannot-assign-requested-address-why/4642
2625
kms_server_url = configuration.kms_server_url + "/kmip/2_1"
27-
# headers = {
28-
# "Content-Type": "application/json",
29-
# "Connection": "close",
30-
# }
31-
headers = {}
26+
headers = {
27+
# "Connection": "close",
28+
}
3229

3330
if configuration.kms_access_token is not None:
3431
headers["Authorization"] = "Bearer " + configuration.kms_access_token

src/module-api/src/op_decrypt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def decrypt(df: pd.DataFrame, algorithm: Algorithm, configuration: ClientConfigu
9595
series = pd.Series(plaintexts)
9696
t_parse_decrypt_response_payload = time.perf_counter() - t_start
9797

98-
logger.debug(
98+
logger.info(
9999
f"decrypt: {algorithm}, size: {len(plaintexts)}, POST: {t_post_operations * 1000000 / len(ciphertexts):.3f} µs/c" +
100100
f" Overhead: {(t_prepare_requests + t_parse_decrypt_response_payload) * 1000000 / len(ciphertexts):.3f} µs/c",
101101
extra={"thread_id": threading.get_ident()}

src/module-api/src/op_encrypt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def encrypt(df: pd.DataFrame, algorithm: Algorithm, configuration: ClientConfigu
8888
series = pd.Series(ciphertexts)
8989
t_parse_encrypt_response_payload = time.perf_counter() - t_start
9090

91-
logger.debug(
91+
logger.info(
9292
f"encrypt: {algorithm}, size: {len(plaintexts)}, POST: {t_post_operations * 1000000 / len(ciphertexts):.3f} µs/c" +
9393
f" Overhead: {(t_prepare_requests + t_parse_encrypt_response_payload) * 1000000 / len(ciphertexts):.3f} µs/c",
9494
extra={"thread_id": threading.get_ident()}

0 commit comments

Comments
 (0)