From f3db5ba64ef68e3d1f4f5606368105d0a3c19788 Mon Sep 17 00:00:00 2001 From: cferreiragonz Date: Tue, 7 May 2024 12:46:22 +0200 Subject: [PATCH 1/3] Refs #20953: TLU_request instance name made from CacheChange writer GUID instead of proxy_data Signed-off-by: cferreiragonz --- .../builtin/type_lookup_service/TypeLookupManager.cpp | 8 +++++--- .../builtin/type_lookup_service/TypeLookupManager.hpp | 5 +++++ .../builtin/discovery/endpoint/EDPSimpleListeners.cpp | 4 ++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp b/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp index 21f525bf221..cefce417707 100644 --- a/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp +++ b/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.cpp @@ -312,18 +312,20 @@ SampleIdentity TypeLookupManager::get_types( ReturnCode_t TypeLookupManager::async_get_type( eprosima::ProxyPool::smart_ptr& temp_writer_data, + const fastdds::rtps::GUID_t& type_server, const AsyncGetTypeWriterCallback& callback) { return check_type_identifier_received( - temp_writer_data, callback, async_get_type_writer_callbacks_); + temp_writer_data, type_server, callback, async_get_type_writer_callbacks_); } ReturnCode_t TypeLookupManager::async_get_type( eprosima::ProxyPool::smart_ptr& temp_reader_data, + const fastdds::rtps::GUID_t& type_server, const AsyncGetTypeReaderCallback& callback) { return check_type_identifier_received( - temp_reader_data, callback, async_get_type_reader_callbacks_); + temp_reader_data, type_server, callback, async_get_type_reader_callbacks_); } TypeKind TypeLookupManager::get_type_kind_to_propagate() const @@ -346,6 +348,7 @@ TypeKind TypeLookupManager::get_type_kind_to_propagate() const template ReturnCode_t TypeLookupManager::check_type_identifier_received( typename eprosima::ProxyPool::smart_ptr& temp_proxy_data, + const fastdds::rtps::GUID_t& type_server, const AsyncCallback& callback, std::unordered_maptype_information().type_information.complete().typeid_with_size() : temp_proxy_data->type_information().type_information.minimal().typeid_with_size(); - fastdds::rtps::GUID_t type_server = temp_proxy_data->guid(); // Check if the type is known if (fastdds::rtps::RTPSDomainImpl::get_instance()->type_object_registry_observer(). diff --git a/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.hpp b/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.hpp index 196aeb94456..3b72c54320d 100644 --- a/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.hpp +++ b/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupManager.hpp @@ -180,6 +180,7 @@ class TypeLookupManager * Use builtin TypeLookup service to solve the type and dependencies of a given TypeInformation. * It receives a callback that will be used to notify when the negotiation is complete. * @param temp_proxy_data[in] Temporary Writer/Reader ProxyData that originated the request. + * @param type_server[in] GUID of the remote participant that has the type. * @param callback Callback called when the negotiation is complete. * @return ReturnCode_t RETCODE_OK if the type is already known. * RETCODE_NO_DATA if type is not known, and a negotiation has been started. @@ -187,9 +188,11 @@ class TypeLookupManager */ ReturnCode_t async_get_type( eprosima::ProxyPool::smart_ptr& temp_proxy_data, + const fastdds::rtps::GUID_t& type_server, const AsyncGetTypeWriterCallback& callback); ReturnCode_t async_get_type( eprosima::ProxyPool::smart_ptr& temp_proxy_data, + const fastdds::rtps::GUID_t& type_server, const AsyncGetTypeReaderCallback& callback); /** @@ -205,6 +208,7 @@ class TypeLookupManager * Adds a callback to the async_get_type_callbacks_ entry of the TypeIdentfierWithSize, or creates a new one if * TypeIdentfierWithSize was not in the map before * @param temp_proxy_data[in] Temporary Writer/Reader ProxyData that originated the request. + * @param type_server[in] GUID of the remote participant that has the type. * @param callback[in] Callback to add. * @param async_get_type_callbacks[in] The collection ProxyData and their callbacks to use. * @return ReturnCode_t RETCODE_OK if type is known. @@ -214,6 +218,7 @@ class TypeLookupManager template ReturnCode_t check_type_identifier_received( typename eprosima::ProxyPool::smart_ptr& temp_proxy_data, + const fastdds::rtps::GUID_t& type_server, const AsyncCallback& callback, std::unordered_mapmp_RTPSParticipant->network_factory(); CDRMessage_t tempMsg(change->serializedPayload); auto temp_writer_data = edp->get_temporary_writer_proxies_pool().get(); + const auto type_server = change->writerGUID; if (temp_writer_data->readFromCDRMessage(&tempMsg, network, edp->mp_RTPSParticipant->has_shm_transport(), true, change->vendor_id)) @@ -141,6 +142,7 @@ void EDPBasePUBListener::add_writer_from_change( { typelookup_manager->async_get_type( temp_writer_data, + type_server, after_typelookup_callback); } // If TypeInformation does not exist, try fallback mechanism @@ -216,6 +218,7 @@ void EDPBaseSUBListener::add_reader_from_change( const NetworkFactory& network = edp->mp_RTPSParticipant->network_factory(); CDRMessage_t tempMsg(change->serializedPayload); auto temp_reader_data = edp->get_temporary_reader_proxies_pool().get(); + const auto type_server = change->writerGUID; if (temp_reader_data->readFromCDRMessage(&tempMsg, network, edp->mp_RTPSParticipant->has_shm_transport(), true, change->vendor_id)) @@ -285,6 +288,7 @@ void EDPBaseSUBListener::add_reader_from_change( { typelookup_manager->async_get_type( temp_reader_data, + type_server, after_typelookup_callback); } // If TypeInformation does not exist, try fallback mechanism From 5b906a7ca089c4efc386cb8257084f3c49bc8b1b Mon Sep 17 00:00:00 2001 From: cferreiragonz Date: Mon, 13 May 2024 08:11:40 +0200 Subject: [PATCH 2/3] Refs #20953: Add Warning for backup with XTypes Signed-off-by: cferreiragonz --- src/cpp/rtps/builtin/BuiltinProtocols.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpp/rtps/builtin/BuiltinProtocols.cpp b/src/cpp/rtps/builtin/BuiltinProtocols.cpp index 846de6a823f..9e36ab50266 100644 --- a/src/cpp/rtps/builtin/BuiltinProtocols.cpp +++ b/src/cpp/rtps/builtin/BuiltinProtocols.cpp @@ -113,6 +113,7 @@ bool BuiltinProtocols::initBuiltinProtocols( #if HAVE_SQLITE3 case DiscoveryProtocol::BACKUP: + EPROSIMA_LOG_WARNING(RTPS_PDP, "BACKUP discovery protocol is not yet supported with XTypes."); mp_PDP = new fastdds::rtps::PDPServer(this, allocation, DurabilityKind_t::TRANSIENT); break; #endif // if HAVE_SQLITE3 From 62a8f0e3cf44d45d1fcb7acdb4b312d2db358c76 Mon Sep 17 00:00:00 2001 From: cferreiragonz Date: Wed, 24 Jul 2024 16:28:58 +0200 Subject: [PATCH 3/3] Refs #20953: Update versions.md Signed-off-by: cferreiragonz --- versions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/versions.md b/versions.md index 0ca525af25d..04e6d83f82c 100644 --- a/versions.md +++ b/versions.md @@ -96,6 +96,8 @@ Forthcoming * Servers only redirect discovery information of their direct clients. * Remote Discovery servers connection list can now be updated and modified at runtime without restrictions. * Fast DDS CLI has been updated to allow the creation of servers without GUID. + * Servers are responsible of answering TypeLookupRequests of others servers when working with X-Types. + * Backup server is not compatible with X-Types. * Refactor in XML Parser to return DynamicTypeBuilder instead of DynamicType * Setting vendor_id in the received CacheChange_t for Data and DataFrag. * Added new DynamicData to JSON serializer (`json_serialize`).