Issue Description
Type: bug report
NettyTransportClient.getCurrentId
private int getCurrentId() {
if (idGenerator.get() > MAX_ID) {
idGenerator.set(0);
}
return idGenerator.incrementAndGet();
}
个人理解这个ID应该是用于协议纠错,getCurrentId的目的是为了循环产生ID,且在循环周期内不重复,即生成ID为1,2,3 ... -> MAX -> 1,2,3 ...。
Describe what happened (or what feature you want)
当前的实现,由于MAX -> MIN 的过程不是一个原子操作,生成的ID可能会出现1,2,3 ... -> MAX -> 1,1,2,3 ...的情况。
Describe what you expected to happen
How to reproduce it (as minimally and precisely as possible)
Tell us your environment
Anything else we need to know?
Issue Description
Type: bug report
NettyTransportClient.getCurrentId个人理解这个ID应该是用于协议纠错,
getCurrentId的目的是为了循环产生ID,且在循环周期内不重复,即生成ID为1,2,3 ... -> MAX -> 1,2,3 ...。Describe what happened (or what feature you want)
当前的实现,由于MAX -> MIN 的过程不是一个原子操作,生成的ID可能会出现
1,2,3 ... -> MAX -> 1,1,2,3 ...的情况。Describe what you expected to happen
How to reproduce it (as minimally and precisely as possible)
Tell us your environment
Anything else we need to know?