@@ -19,13 +19,13 @@ local CRUD_CALL_FUNC_NAME = utils.get_storage_call(CALL_FUNC_NAME)
1919
2020-- Methods that can continue execution in fast mode when rebalance starts
2121local safe_mode_allowed_fast_methods = {
22- CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' readview_open_on_storage' ),
23- CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' readview_close_on_storage' ),
24- CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' select_readview_on_storage' ),
25- CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' truncate_on_storage' ),
26- CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' len_on_storage' ),
27- CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' count_on_storage' ),
28- CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' get_border_on_storage' ),
22+ [ CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' readview_open_on_storage' )] = true ,
23+ [ CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' readview_close_on_storage' )] = true ,
24+ [ CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' select_readview_on_storage' )] = true ,
25+ [ CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' truncate_on_storage' )] = true ,
26+ [ CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' len_on_storage' )] = true ,
27+ [ CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' count_on_storage' )] = true ,
28+ [ CRUD_CALL_FUNC_NAME .. ' /fast/' .. utils .get_storage_call (' get_border_on_storage' )] = true ,
2929}
3030
3131local call = {}
@@ -46,17 +46,8 @@ local function safe_mode_enable()
4646 call_on_storage = call_on_storage_safe
4747
4848 for fb_id , fb in pairs (fiber .info ()) do
49- if string.find (fb .name , CRUD_CALL_FUNC_NAME .. ' /fast/' ) then
50- local do_kill = true
51- for _ , allowed_method in ipairs (safe_mode_allowed_fast_methods ) do
52- if fb .name == allowed_method then
53- do_kill = false
54- break
55- end
56- end
57- if do_kill then
58- fiber .kill (fb_id )
59- end
49+ if fb .name :startswith (CRUD_CALL_FUNC_NAME .. ' /fast/' ) and not safe_mode_allowed_fast_methods [fb .name ] then
50+ fiber .kill (fb_id )
6051 end
6152 end
6253end
0 commit comments