【发布时间】:2018-08-10 00:33:07
【问题描述】:
"[WARN] 没有要取消设置的 seqid" 此警告的原因是什么? (NodeJS)
【问题讨论】:
标签: node.js thrift thrift-protocol
"[WARN] 没有要取消设置的 seqid" 此警告的原因是什么? (NodeJS)
【问题讨论】:
标签: node.js thrift thrift-protocol
原因是版本不匹配。 0.9.3 和最新版
【讨论】:
对于 0.11.0 版本,这是一个错误
TBinaryProtocol.prototype.writeMessageEnd = function() {
if (this._seqid) {
this._seqid = null;
} else {
log.warning('No seqid to unset');
}
};
this._seqid 为 0 时为 false。
现在已在分支 master 中修复
// from `if (this._seqid)` to `if (this._seqid !== null )`
TBinaryProtocol.prototype.writeMessageEnd = function() {
if (this._seqid !== null) {
this._seqid = null;
} else {
log.warning('No seqid to unset');
}
};
查看源文件:https://github.com/apache/thrift/blob/master/lib/nodejs/lib/thrift/binary_protocol.js
【讨论】: