ivanallen commented on code in PR #3197:
URL: https://github.com/apache/brpc/pull/3197#discussion_r2707588137


##########
src/brpc/policy/flatbuffers_protocol.cpp:
##########
@@ -0,0 +1,472 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "butil/logging.h"                       // LOG()
+#include "butil/iobuf.h"                         // butil::IOBuf
+#include "butil/single_iobuf.h"                  // butil::SingleIOBuf
+#include "butil/time.h"
+
+#include "butil/raw_pack.h"                      // RawPacker RawUnpacker
+
+#include "brpc/controller.h"                     // Controller
+#include "brpc/socket.h"                         // Socket
+#include "brpc/server.h"                         // Server
+#include "brpc/stream_impl.h"
+#include "brpc/rpc_dump.h"                       // SampledRequest
+#include "brpc/policy/most_common_message.h"
+#include "brpc/details/controller_private_accessor.h"
+#include "brpc/details/server_private_accessor.h"
+#include "brpc/policy/flatbuffers_protocol.h"
+
+namespace brpc {
+namespace policy {
+
+struct FBRpcRequestMeta {
+    struct {
+        uint32_t service_index;

Review Comment:
   method_index 是怎么保证兼容性的。在另一个 pr 中,并没有看到为 method 声明 index,那么我猜可能是由 flatc 自动生成的。
   假如用户删除,或者增加 method,那么可能会导致对应的 method index 产生变化,在升级的时候会出现问题。



-- 
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]

Reply via email to