52
52
ServerLicenseGetError ,
53
53
ServerLicenseSetError ,
54
54
ServerLogLevelError ,
55
+ ServerLogLevelResetError ,
55
56
ServerLogLevelSetError ,
56
57
ServerLogSettingError ,
57
58
ServerLogSettingSetError ,
@@ -1003,6 +1004,35 @@ def response_handler(resp: Response) -> Json:
1003
1004
1004
1005
return self ._execute (request , response_handler )
1005
1006
1007
+ def reset_log_levels (self , server_id : Optional [str ] = None ) -> Result [Json ]:
1008
+ """Reset the logging levels.
1009
+
1010
+ Revert the server’s log level settings to the values they had at startup,
1011
+ as determined by the startup options specified on the command-line,
1012
+ a configuration file, and the factory defaults.
1013
+
1014
+ :param server_id: Forward log level to a specific server. This makes it
1015
+ easier to adjust the log levels in clusters because DB-Servers require
1016
+ JWT authentication whereas Coordinators also support authentication
1017
+ using usernames and passwords.
1018
+ :type server_id: str | None
1019
+ :return: New logging levels.
1020
+ :rtype: dict
1021
+ """
1022
+ params : Params = {}
1023
+ if server_id is not None :
1024
+ params ["serverId" ] = server_id
1025
+
1026
+ request = Request (method = "delete" , endpoint = "/_admin/log/level" , params = params )
1027
+
1028
+ def response_handler (resp : Response ) -> Json :
1029
+ if not resp .is_success :
1030
+ raise ServerLogLevelResetError (resp , request )
1031
+ result : Json = resp .body
1032
+ return result
1033
+
1034
+ return self ._execute (request , response_handler )
1035
+
1006
1036
def reload_routing (self ) -> Result [bool ]:
1007
1037
"""Reload the routing information.
1008
1038
@@ -3020,6 +3050,7 @@ def begin_transaction(
3020
3050
allow_implicit : Optional [bool ] = None ,
3021
3051
lock_timeout : Optional [int ] = None ,
3022
3052
max_size : Optional [int ] = None ,
3053
+ skip_fast_lock_round : Optional [bool ] = None ,
3023
3054
) -> "TransactionDatabase" :
3024
3055
"""Begin a transaction.
3025
3056
@@ -3043,6 +3074,9 @@ def begin_transaction(
3043
3074
:type lock_timeout: int | None
3044
3075
:param max_size: Max transaction size in bytes.
3045
3076
:type max_size: int | None
3077
+ :param skip_fast_lock_round: Whether to disable fast locking for write
3078
+ operations.
3079
+ :type skip_fast_lock_round: bool | None
3046
3080
:return: Database API wrapper object specifically for transactions.
3047
3081
:rtype: arango.database.TransactionDatabase
3048
3082
"""
@@ -3055,6 +3089,7 @@ def begin_transaction(
3055
3089
allow_implicit = allow_implicit ,
3056
3090
lock_timeout = lock_timeout ,
3057
3091
max_size = max_size ,
3092
+ skip_fast_lock_round = skip_fast_lock_round ,
3058
3093
)
3059
3094
3060
3095
def begin_controlled_execution (
@@ -3191,6 +3226,8 @@ class TransactionDatabase(Database):
3191
3226
:param transaction_id: Initialize using an existing transaction instead of creating
3192
3227
a new transaction.
3193
3228
:type transaction_id: str | None
3229
+ :param skip_fast_lock_round: Whether to disable fast locking for write operations.
3230
+ :type skip_fast_lock_round: bool | None
3194
3231
"""
3195
3232
3196
3233
def __init__ (
@@ -3204,6 +3241,7 @@ def __init__(
3204
3241
lock_timeout : Optional [int ] = None ,
3205
3242
max_size : Optional [int ] = None ,
3206
3243
transaction_id : Optional [str ] = None ,
3244
+ skip_fast_lock_round : Optional [bool ] = None ,
3207
3245
) -> None :
3208
3246
self ._executor : TransactionApiExecutor
3209
3247
super ().__init__ (
@@ -3218,6 +3256,7 @@ def __init__(
3218
3256
lock_timeout = lock_timeout ,
3219
3257
max_size = max_size ,
3220
3258
transaction_id = transaction_id ,
3259
+ skip_fast_lock_round = skip_fast_lock_round ,
3221
3260
),
3222
3261
)
3223
3262
0 commit comments