You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/03/16 01:56:15 UTC
[GitHub] [dubbo-go] rockXiaofeng opened a new pull request #1087: bugfix: Give it an initial value when attachments is nil
rockXiaofeng opened a new pull request #1087:
URL: https://github.com/apache/dubbo-go/pull/1087
<!-- Thanks for sending a pull request!
Read https://github.com/apache/dubbo-go/blob/master/contributing.md before commit pull request.
-->
**What this PR does**:
Give it an initial value when attachments is nil
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes https://github.com/apache/dubbo-go/issues/993
**Special notes for your reviewer**:
**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] pantianying removed a comment on pull request #1087: Bugfix: nil attachments
Posted by GitBox <gi...@apache.org>.
pantianying removed a comment on pull request #1087:
URL: https://github.com/apache/dubbo-go/pull/1087#issuecomment-801005702
I don't think this is a bug of dubbo-go. If there is no upstream attachment, why initialize one? But I also see no problem with your PR code if it improves protocol compatibility. However, we need to confirm the compatibility with the Java side
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks merged pull request #1087: Bugfix: nil attachments
Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #1087:
URL: https://github.com/apache/dubbo-go/pull/1087
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] rockXiaofeng commented on pull request #1087: Bugfix: nil attachments
Posted by GitBox <gi...@apache.org>.
rockXiaofeng commented on pull request #1087:
URL: https://github.com/apache/dubbo-go/pull/1087#issuecomment-802610442
FYI (from com.alibaba/dubbo) :
```
public class DecodeableRpcInvocation extends RpcInvocation implements Codec, Decodeable {
...
@Override
public Object decode(Channel channel, InputStream input) throws IOException {
ObjectInput in = CodecSupport.getSerialization(channel.getUrl(), serializationType)
.deserialize(channel.getUrl(), input);
String dubboVersion = in.readUTF();
request.setVersion(dubboVersion);
setAttachment(Constants.DUBBO_VERSION_KEY, dubboVersion);
setAttachment(Constants.PATH_KEY, in.readUTF());
setAttachment(Constants.VERSION_KEY, in.readUTF());
...
Map<string, string=""> map = (Map<string, string="">) in.readObject(Map.class);
if (map != null && map.size() > 0) {
Map<string, string=""> attachment = getAttachments();
if (attachment == null) {
attachment = new HashMap<string, string="">();
}
attachment.putAll(map);
setAttachments(attachment);
}
//decode argument ,may be callback
for (int i = 0; i < args.length; i++) {
args[i] = decodeInvocationArgument(channel, this, pts, i, args[i]);
}
setArguments(args);
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] rockXiaofeng commented on pull request #1087: Bugfix: nil attachments
Posted by GitBox <gi...@apache.org>.
rockXiaofeng commented on pull request #1087:
URL: https://github.com/apache/dubbo-go/pull/1087#issuecomment-801546346
> I don't think this is a bug of dubbo-go. If there is no upstream attachment, why initialize one? But I also see no problem with your PR code if it improves protocol compatibility. However, we need to confirm the compatibility with the Java side
OK, I agree with you, but according to the issuer:
```
"Anything else we need to know?:
The same thing doesn't happen with the tengine's Java example. It works as the document states."
```
So, it should be confirmed whether java-server is compatible with this situation.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] rockXiaofeng commented on pull request #1087: Bugfix: nil attachments
Posted by GitBox <gi...@apache.org>.
rockXiaofeng commented on pull request #1087:
URL: https://github.com/apache/dubbo-go/pull/1087#issuecomment-802594062
I encountered this problem when I used the dubbo plugin of apisix as proxy, and dubbo-go as server provider, so I submitted this PR and the problem was solved in my side.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks commented on pull request #1087: Bugfix: nil attachments
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on pull request #1087:
URL: https://github.com/apache/dubbo-go/pull/1087#issuecomment-800985572
@pantianying @fangyincheng pls check this pr.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] pantianying commented on pull request #1087: Bugfix: nil attachments
Posted by GitBox <gi...@apache.org>.
pantianying commented on pull request #1087:
URL: https://github.com/apache/dubbo-go/pull/1087#issuecomment-801005702
I don't think this is a bug of dubbo-go. If there is no upstream attachment, why initialize one? But I also see no problem with your PR code if it improves protocol compatibility. However, we need to confirm the compatibility with the Java side
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org