baidu / baidu/Jprotobuf-rpc-socket

inconsistent protobuf structure definition between rpcRequestMeta and brpc protobuf

Open
#92 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
535
Forks
216
PR merge metrics
No merged PRs in 30d

Description

https://github.com/baidu/Jprotobuf-rpc-socket/blob/master/jprotobuf-rpc-core/src/main/java/com/baidu/jprotobuf/pbrpc/data/RpcRequestMeta.java
```
/** 分布式追踪 Parent Span ID. */
@Protobuf(order = 6)
private Long parentSpanId;

/** 扩展字段. */
@Protobuf(order = 7)
private List extFields;

/** 非PbRpc规范,用于传输额外的参数. */
@Protobuf(fieldType = FieldType.BYTES, order = 110)
private byte[] extraParam;
```

https://github.com/apache/brpc/blob/master/src/brpc/policy/baidu_rpc_meta.proto
```
message RpcRequestMeta {
required string service_name = 1;
required string method_name = 2;
optional int64 log_id = 3;
optional int64 trace_id = 4;
optional int64 span_id = 5;
optional int64 parent_span_id = 6;
optional string request_id = 7; // correspond to x-request-id in http header
optional int32 timeout_ms = 8; // client's timeout setting for current call
}
```

when will jprotobuf rpc support set request id and timeout to rpc request?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with jprotobuf-rpc-core/src/main/java/com/baidu/jprotobuf/pbrpc/data/RpcRequestMeta.java and compare its field definitions with brpc/src/brpc/policy/baidu_rpc_meta.proto. Trace how RpcRequestMeta is serialized, then determine how request_id and timeout_ms should be represented without breaking existing field numbering. Done means both values are supported consistently with the brpc structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.