github-actions[bot] commented on code in PR #65818:
URL: https://github.com/apache/doris/pull/65818#discussion_r3613798776
##########
thirdparty/patches/brpc-1.4.0-secondary-package-name.patch:
##########
@@ -27,17 +27,21 @@ index 2087cbcf..7aede561 100644
+ secondary_method_name.append(secondary_full_name);
+ secondary_method_name.push_back('.');
+ secondary_method_name.append(md->name());
-+ _method_map[secondary_method_name] = mp;
++ MethodProperty secondary_mp = mp;
++ secondary_mp.own_method_status = false;
Review Comment:
[P2] Preserve ownership when the alias equals the primary package
`secondary_package_name` is unrestricted. For MetaService, setting it to the
current package `doris.cloud` makes the derived service and method keys
identical to the primary keys. `FlatMap::operator[]` then overwrites the
just-inserted owning entries with these non-owning copies, so
`RemoveService()`/`ClearServices()` no longer delete the `MethodStatus` objects
or the `SERVER_OWNS_SERVICE` allocation. Please reject or skip an alias equal
to the primary package before assigning the non-owning copies.
##########
thirdparty/patches/brpc-1.4.0-secondary-package-name.patch:
##########
@@ -27,17 +27,21 @@ index 2087cbcf..7aede561 100644
+ secondary_method_name.append(secondary_full_name);
+ secondary_method_name.push_back('.');
+ secondary_method_name.append(md->name());
-+ _method_map[secondary_method_name] = mp;
++ MethodProperty secondary_mp = mp;
Review Comment:
[P2] Add a runtime regression for this ownership path
`cloud/test/meta_server_test.cpp` still forces
`config::secondary_package_name = ""` specifically to avoid the `brpc::Server`
destructor crash, so no test executes this changed non-owning branch. A
patch-application/build check cannot prove the lifetime behavior. Please run a
distinct non-empty alias with an owned service, verify both names resolve, and
prove clear/destruction reclaims the shared service/status exactly once; also
cover the equal-package ownership case above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]