eclipse-cyclonedds / cyclonedds

Eclipse Cyclone DDS project
https://projects.eclipse.org/projects/iot.cyclonedds
Other
888 stars 363 forks source link

Allow more children per entity #2119

Closed eboasson closed 3 weeks ago

eboasson commented 3 weeks ago

Sometimes application overflow the children counters in the handle flags. That leads to a bad crash, which is a bug, but it is also less than ideal than one can't make a great many child entities.

With the way the bits are mapped, one can have 16k children of a single entity and 4k concurrent calls on a single entity. This commit changes that in two ways:

Just widening the counters is not an elegant solution, and 64-bits here is a bit wasteful. Still, this should fix the problem at least in practice.

I expect this will address the problems in #1679 and #2022 (although the latter doesn't quite seem to reach the required numbers, the symptom matches). As that all with ROS 2, it needs to be backported to the releases/0.10.x branch until Cyclone master/11.0-to-be and ROS 2 are friends again. (I expect it to be a trivial backport.)

eboasson commented 3 weeks ago

LGTM!

Nit-pick: the (disabled) trace logging in print_delete in src/core/ddsc/src/dds_entity.c:378 still has a ddsrt_atomic_ld32 on cnt_flags

Great catch!