Skip to content

Commit 75205a7

Browse files
authored
Deprecate box.session.push() (#4695)
Resolves #3615
1 parent f396382 commit 75205a7

File tree

6 files changed

+55
-1
lines changed

6 files changed

+55
-1
lines changed

Diff for: doc/reference/configuration/configuration_reference.rst

+1
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ The ``compat`` section defines values of the :ref:`compat <compat-module>` modul
529529
- ``new``: raise an error
530530
- ``old``: do not raise an error
531531

532+
See also: :ref:`compat-option-session-push-deprecation`
532533

533534
|
534535
| Type: string

Diff for: doc/reference/reference_capi/box.rst

+2
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@
192192
193193
.. c:function:: int box_session_push(const char *data, const char *data_end)
194194
195+
**Deprecated since** :doc:`3.0.0 </release/3.0.0>`.
196+
195197
Since version :doc:`2.4.1 </release/2.4.1>`. Push MessagePack data into
196198
a session data channel -- socket, console or
197199
whatever is behind the session. Behaves just like Lua

Diff for: doc/reference/reference_lua/box_session.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Below is a list of all ``box.session`` functions and members.
6767
- Define a trigger to report restricted actions
6868

6969
* - :doc:`./box_session/push`
70-
- Send an out-of-band message
70+
- (Deprecated) Send an out-of-band message
7171

7272
.. toctree::
7373
:hidden:

Diff for: doc/reference/reference_lua/box_session/push.rst

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ box.session.push()
1010

1111
.. function:: box.session.push(message [, sync])
1212

13+
**Deprecated since** :doc:`3.0.0 </release/3.0.0>`.
14+
1315
Generate an out-of-band message. By "out-of-band" we mean an extra
1416
message which supplements what is passed in a network via the usual
1517
channels. Although ``box.session.push()`` can be called at any time, in

Diff for: doc/reference/reference_lua/compat.rst

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Below are the available ``compat`` options:
7474
* :doc:`fiber_slice_default <./compat/fiber_slice_default>`
7575
* :doc:`binary_data_decoding <./compat/binary_data_decoding>`
7676
* :doc:`box_info_cluster_meaning <./compat/box_info_cluster_meaning>`
77+
* :doc:`box_session_push_deprecation <./compat/box_session_push_deprecation>`
7778

7879
.. toctree::
7980
:hidden:
@@ -85,4 +86,5 @@ Below are the available ``compat`` options:
8586
compat/sql_seq_scan_default
8687
compat/fiber_slice_default
8788
compat/binary_data_decoding
89+
compat/box_session_push_deprecation
8890
compat/compat_tutorial
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.. _compat-option-session-push-deprecation:
2+
3+
box.session.push() deprecation
4+
==============================
5+
6+
Option: ``box_session_push_deprecation``
7+
8+
Starting from version 3.0, Lua API function :ref:`box.session.push() <box_session-push>`
9+
and C API function :ref:`box_session_push() <box_box_session_push>` are deprecated.
10+
11+
Old and new behavior
12+
--------------------
13+
14+
New behavior: calling `box.session.push()` raises an error.
15+
16+
.. code-block:: tarantoolsession
17+
18+
tarantool> box.session.push({1})
19+
---
20+
- error: box.session.push is deprecated
21+
...
22+
23+
Old behavior: `box.session.push()` is available to use. When it's called for the
24+
first time, a deprecation warning is printed to the log.
25+
26+
.. code-block:: tarantoolsession
27+
28+
tarantool> box.session.push({1})
29+
2024-12-18 15:42:51.537 [50750] main/104/interactive session.c:569 W> box.session.push is deprecated. Consider using box.broadcast instead.
30+
%TAG !push! tag:tarantool.io/push,2018
31+
---
32+
- 1
33+
...
34+
---
35+
- true
36+
...
37+
38+
Known compatibility issues
39+
--------------------------
40+
41+
At this point, no incompatible modules are known.
42+
43+
Detecting issues in your codebase
44+
---------------------------------
45+
46+
If your application uses `box.session.push()`, consider rewriting it using
47+
:ref:`box.broadcast() <box-broadcast>`.

0 commit comments

Comments
 (0)