@@ -470,7 +470,7 @@ Below is a list of all ``net.box`` functions.
470
470
.. method :: conn.space.<space-name>:upsert({field-value, ...} [, {options}])
471
471
472
472
:samp: `conn.space.{ space-name } :upsert(...) ` is the remote-call equivalent
473
- of the local call :samp: `box.space.{ space-name } :upsert(...) `. (:ref: `see details <box_space-upsert >`)
473
+ of the local call :samp: `box.space.{ space-name } :upsert(...) `. (:ref: `see details <box_space-upsert >`).
474
474
For an additional option see :ref: `Module buffer and skip-header <buffer-module_and_skip_header >`.
475
475
476
476
.. _conn-delete :
@@ -794,16 +794,20 @@ With the ``net.box`` module, you can use the following
794
794
795
795
Define a trigger for execution when a new connection is established, and authentication
796
796
and schema fetch are completed due to an event such as ``net_box.connect ``.
797
+
798
+ If a trigger function issues ``net_box `` requests, they must be :ref: `asynchronous <net_box-is_async >`
799
+ (``{is_async = true} ``). An attempt to wait for request completion with ``future:pairs() ``
800
+ or ``future:wait_result() `` in the trigger function will result in an error.
801
+
797
802
If the trigger execution fails and an exception happens, the connection's
798
803
state changes to 'error'. In this case, the connection is terminated, regardless of the
799
804
``reconnect_after `` option's value. Can be called as many times as
800
805
reconnection happens, if ``reconnect_after `` is greater than zero.
801
806
802
- :param function trigger-function: function which will become the trigger
803
- function. Takes the ``conn ``
804
- object as the first argument
805
- :param function old-trigger-function: existing trigger function which will
806
- be replaced by trigger-function
807
+ :param function trigger-function: the trigger function. Takes the ``conn ``
808
+ object as the first argument.
809
+ :param function old-trigger-function: an existing trigger function to replace
810
+ with ``trigger-function ``
807
811
:return: nil or function pointer
808
812
809
813
.. _net_box-on_disconnect :
@@ -815,11 +819,11 @@ With the ``net.box`` module, you can use the following
815
819
Execution stops after a connection is explicitly closed, or once the Lua
816
820
garbage collector removes it.
817
821
818
- :param function trigger-function: function which will become the trigger
822
+ :param function trigger-function: the trigger
819
823
function. Takes the ``conn ``
820
824
object as the first argument
821
- :param function old-trigger-function: existing trigger function which will
822
- be replaced by trigger-function
825
+ :param function old-trigger-function: an existing trigger function to replace
826
+ with `` trigger-function ``
823
827
:return: nil or function pointer
824
828
825
829
.. _net_box-on_shutdown :
@@ -845,11 +849,10 @@ With the ``net.box`` module, you can use the following
845
849
just close the connection abruptly.
846
850
In this case, the ``on_shutdown() `` trigger is not executed.
847
851
848
- :param function trigger-function: function which will become the trigger
849
- function. Takes the ``conn ``
852
+ :param function trigger-function: the trigger function. Takes the ``conn ``
850
853
object as the first argument
851
- :param function old-trigger-function: existing trigger function which will
852
- be replaced by trigger-function
854
+ :param function old-trigger-function: an existing trigger function to replace
855
+ with `` trigger-function ``
853
856
:return: nil or function pointer
854
857
855
858
.. _net_box-on_schema_reload :
@@ -860,11 +863,14 @@ With the ``net.box`` module, you can use the following
860
863
server after schema has been updated. So, if a server request fails due to a
861
864
schema version mismatch error, schema reload is triggered.
862
865
863
- :param function trigger-function: function which will become the trigger
864
- function. Takes the ``conn ``
866
+ If a trigger function issues ``net_box `` requests, they must be :ref: `asynchronous <net_box-is_async >`
867
+ (``{is_async = true} ``). An attempt to wait for request completion with ``future:pairs() ``
868
+ or ``future:wait_result() `` in the trigger function will result in an error.
869
+
870
+ :param function trigger-function: the trigger function. Takes the ``conn ``
865
871
object as the first argument
866
- :param function old-trigger-function: existing trigger function which will
867
- be replaced by trigger-function
872
+ :param function old-trigger-function: an existing trigger function to replace
873
+ with `` trigger-function ``
868
874
:return: nil or function pointer
869
875
870
876
.. NOTE ::
@@ -875,5 +881,5 @@ With the ``net.box`` module, you can use the following
875
881
If both parameters are omitted, then the response is a list of
876
882
existing trigger functions.
877
883
878
- Details about trigger characteristics are in the
884
+ Find the detailed information about triggers in the
879
885
:ref: `triggers <triggers-box_triggers >` section.
0 commit comments