14
14
* See the License for the specific language governing permissions and
15
15
* limitations under the License.
16
16
*/
17
+
17
18
use bytes:: Bytes ;
18
19
use rocketmq_common:: {
19
20
common:: { mix_all, mq_version:: RocketMqVersion } ,
@@ -31,7 +32,7 @@ use rocketmq_remoting::{
31
32
RemotingSerializable ,
32
33
} ,
33
34
} ;
34
- use tracing:: { info , warn} ;
35
+ use tracing:: warn;
35
36
36
37
use crate :: route:: route_info_manager:: RouteInfoManager ;
37
38
@@ -67,17 +68,14 @@ impl BrokerRequestProcessor {
67
68
let request_header = request
68
69
. decode_command_custom_header :: < RegisterBrokerRequestHeader > ( )
69
70
. unwrap ( ) ;
70
- let opaque = request. opaque ( ) ;
71
-
72
71
if !check_sum_crc32 ( & request, & request_header) {
73
72
return RemotingCommand :: create_response_command_with_code (
74
73
RemotingSysResponseCode :: SystemError as i32 ,
75
74
)
76
- . set_remark ( Some ( String :: from ( "crc32 not match" ) ) )
77
- . set_opaque ( opaque) ;
75
+ . set_remark ( Some ( String :: from ( "crc32 not match" ) ) ) ;
78
76
}
79
77
80
- let response_command = RemotingCommand :: create_response_command ( ) . set_opaque ( opaque ) ;
78
+ let response_command = RemotingCommand :: create_response_command ( ) ;
81
79
let broker_version = RocketMqVersion :: try_from ( request. version ( ) ) . unwrap ( ) ;
82
80
let topic_config_wrapper;
83
81
let mut filter_server_list = Vec :: < String > :: new ( ) ;
@@ -127,11 +125,10 @@ impl BrokerRequestProcessor {
127
125
}
128
126
129
127
impl BrokerRequestProcessor {
130
- fn process_get_broker_cluster_info ( & mut self , request : RemotingCommand ) -> RemotingCommand {
128
+ fn process_get_broker_cluster_info ( & mut self , _request : RemotingCommand ) -> RemotingCommand {
131
129
let vec = self . route_info_manager . get_all_cluster_info ( ) . encode ( false ) ;
132
130
RemotingCommand :: create_response_command_with_code ( RemotingSysResponseCode :: Success as i32 )
133
131
. set_body ( Some ( Bytes :: from ( vec) ) )
134
- . set_opaque ( request. opaque ( ) )
135
132
}
136
133
}
137
134
@@ -168,10 +165,6 @@ fn check_sum_crc32(
168
165
}
169
166
if let Some ( bytes) = & request. get_body ( ) {
170
167
let crc_32 = crc32 ( bytes. iter ( ) . as_ref ( ) ) ;
171
- info ! (
172
- "Rec request body crc32:{}-{}" ,
173
- request_header. body_crc32, crc_32
174
- ) ;
175
168
if crc_32 != request_header. body_crc32 {
176
169
warn ! (
177
170
"receive registerBroker request,crc32 not match,origin:{}, cal:{}" ,
0 commit comments