Skip to content

Commit b7ffb29

Browse files
Clarify default empty Partition behavior in Partition QoS (#1237) (#1243)
Signed-off-by: danipiza <dpizarrogallego@gmail.com> Co-authored-by: DannyP39 <98972125+Danipiza@users.noreply.github.com>
1 parent 11ca96d commit b7ffb29

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

docs/fastdds/dds_layer/domain/domainParticipant/partition.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ In this sense, partitions represent a light mechanism to provide data separation
3636
The Partition membership of an endpoint can be configured on the :ref:`api_pim_partitionqospolicy`
3737
data member of the :ref:`dds_layer_publisher_publisherQos` or :ref:`dds_layer_subscriber_subscriberQos` objects.
3838
This member holds a list of Partition name strings.
39-
If no Partition is defined for an entity, it will be automatically included in the default nameless Partition.
40-
Therefore, a Publisher and a Subscriber that specify no Partition will still
41-
be able to communicate through the default nameless Partition.
39+
In DDS, the default Partition name is the empty string ``""``.
40+
Therefore, an empty list (``{}``) is equivalent to a list containing only the empty string (``{""}``).
41+
As a result, a Publisher and a Subscriber that specify no Partition can still communicate through the default
42+
Partition, and explicitly configuring ``""`` has the same behavior.
43+
If ``""`` is included together with additional names, the endpoint belongs to the default Partition and to those
44+
additional Partitions.
4245

4346
.. warning::
4447

@@ -68,7 +71,8 @@ For example, consider the following configuration:
6871
Even though ``partition*`` does not match ``part*``, these Publisher and Subscriber
6972
will communicate between them because ``part*`` matches ``partition*``.
7073

71-
Note that a Partition with name ``*`` will match any other partition **except the default Partition**.
74+
Note that a Partition with name ``*`` will match any other partition,
75+
including the default Partition ``""``.
7276

7377
Full example
7478
------------
@@ -80,7 +84,7 @@ Given a system with the following Partition configuration:
8084
+ +---------+--------------------------------+
8185
| | Pub_12 | {"*"} |
8286
+----------------+---------+--------------------------------+
83-
| Participant_2 | Pub_21 | {} |
87+
| Participant_2 | Pub_21 | {default} ≡ {""} ≡ {} |
8488
+ +---------+--------------------------------+
8589
| | Pub_22 | {"Partition*"} |
8690
+----------------+---------+--------------------------------+
@@ -90,11 +94,10 @@ Given a system with the following Partition configuration:
9094
+ +---------+--------------------------------+
9195
| | Subs_33 | {"Partition_3"} |
9296
+ +---------+--------------------------------+
93-
| | Subs_34 | {} |
97+
| | Subs_34 | {default} ≡ {""} ≡ {} |
9498
+----------------+---------+--------------------------------+
9599

96100
The endpoints will finally match the Partitions depicted on the following table.
97-
Note that ``Pub_12`` does not match the default Partition.
98101

99102
+--------------+-------------------+-------------------+---------------------------------------+
100103
| | Participant_1 | Participant_2 | Participant_3 |
@@ -107,7 +110,7 @@ Note that ``Pub_12`` does not match the default Partition.
107110
+--------------+---------+---------+---------+---------+---------+---------+---------+---------+
108111
| Partition_3 |||||||||
109112
+--------------+---------+---------+---------+---------+---------+---------+---------+---------+
110-
| {default} || |||||||
113+
| {default} || |||||||
111114
+--------------+---------+---------+---------+---------+---------+---------+---------+---------+
112115

113116
The following table provides the communication matrix for the given example:
@@ -123,7 +126,7 @@ The following table provides the communication matrix for the given example:
123126
+ +---------+---------+---------+---------+---------+
124127
| | Subs_33 |||||
125128
+ +---------+---------+---------+---------+---------+
126-
| | Subs_34 || |||
129+
| | Subs_34 || |||
127130
+----------------+---------+---------+---------+---------+---------+
128131

129132
The following piece of code shows the set of parameters needed for the use case depicted in this example.

0 commit comments

Comments
 (0)