@@ -33,7 +33,6 @@ def __init__(self, driver: common_utils.SupportedDriverType, size: int = 100):
33
33
:param size: Max size of Session Pool.
34
34
"""
35
35
36
- logger .warning ("QuerySessionPool is an experimental API, which could be changed." )
37
36
self ._driver = driver
38
37
self ._queue = queue .Queue ()
39
38
self ._current_size = 0
@@ -48,9 +47,7 @@ def _create_new_session(self, timeout: Optional[float]):
48
47
return session
49
48
50
49
def acquire (self , timeout : Optional [float ] = None ) -> QuerySession :
51
- """WARNING: This API is experimental and could be changed.
52
-
53
- Acquire a session from Session Pool.
50
+ """Acquire a session from Session Pool.
54
51
55
52
:param timeout: A timeout to wait in seconds.
56
53
@@ -102,28 +99,22 @@ def acquire(self, timeout: Optional[float] = None) -> QuerySession:
102
99
self ._lock .release ()
103
100
104
101
def release (self , session : QuerySession ) -> None :
105
- """WARNING: This API is experimental and could be changed.
106
-
107
- Release a session back to Session Pool.
102
+ """Release a session back to Session Pool.
108
103
"""
109
104
110
105
self ._queue .put_nowait (session )
111
106
logger .debug ("Session returned to queue: %s" , session ._state .session_id )
112
107
113
108
def checkout (self , timeout : Optional [float ] = None ) -> "SimpleQuerySessionCheckout" :
114
- """WARNING: This API is experimental and could be changed.
115
-
116
- Return a Session context manager, that acquires session on enter and releases session on exit.
109
+ """Return a Session context manager, that acquires session on enter and releases session on exit.
117
110
118
111
:param timeout: A timeout to wait in seconds.
119
112
"""
120
113
121
114
return SimpleQuerySessionCheckout (self , timeout )
122
115
123
116
def retry_operation_sync (self , callee : Callable , retry_settings : Optional [RetrySettings ] = None , * args , ** kwargs ):
124
- """WARNING: This API is experimental and could be changed.
125
-
126
- Special interface to execute a bunch of commands with session in a safe, retriable way.
117
+ """Special interface to execute a bunch of commands with session in a safe, retriable way.
127
118
128
119
:param callee: A function, that works with session.
129
120
:param retry_settings: RetrySettings object.
@@ -147,9 +138,7 @@ def execute_with_retries(
147
138
* args ,
148
139
** kwargs ,
149
140
) -> List [convert .ResultSet ]:
150
- """WARNING: This API is experimental and could be changed.
151
-
152
- Special interface to execute a one-shot queries in a safe, retriable way.
141
+ """Special interface to execute a one-shot queries in a safe, retriable way.
153
142
Note: this method loads all data from stream before return, do not use this
154
143
method with huge read queries.
155
144
0 commit comments