Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
043a091445
@ -101,6 +101,11 @@ Contributors are welcomed to join Nacos project. Please check [CONTRIBUTING](./C
|
|||||||
|
|
||||||
![cwex](https://img.alicdn.com/tfs/TB1bpBlQmrqK1RjSZK9XXXyypXa-830-972.png_288x480q80.jpg)
|
![cwex](https://img.alicdn.com/tfs/TB1bpBlQmrqK1RjSZK9XXXyypXa-830-972.png_288x480q80.jpg)
|
||||||
|
|
||||||
|
## Download
|
||||||
|
|
||||||
|
- [Github Release](https://github.com/alibaba/nacos/releases)
|
||||||
|
- [Baidu Netdisk](https://pan.baidu.com/s/1186nmlqPGows9gUZKAx8Zw) Fetch Code : `rest`
|
||||||
|
|
||||||
|
|
||||||
## Who is using
|
## Who is using
|
||||||
|
|
||||||
|
@ -317,8 +317,6 @@ public class PushService implements ApplicationContextAware, ApplicationListener
|
|||||||
try {
|
try {
|
||||||
packet = new DatagramPacket(dataBytes, dataBytes.length, client.socketAddr);
|
packet = new DatagramPacket(dataBytes, dataBytes.length, client.socketAddr);
|
||||||
Receiver.AckEntry ackEntry = new Receiver.AckEntry(key, packet);
|
Receiver.AckEntry ackEntry = new Receiver.AckEntry(key, packet);
|
||||||
ackEntry.data = data;
|
|
||||||
|
|
||||||
// we must store the key be fore send, otherwise there will be a chance the
|
// we must store the key be fore send, otherwise there will be a chance the
|
||||||
// ack returns before we put in
|
// ack returns before we put in
|
||||||
ackEntry.data = data;
|
ackEntry.data = data;
|
||||||
@ -649,7 +647,7 @@ public class PushService implements ApplicationContextAware, ApplicationListener
|
|||||||
try {
|
try {
|
||||||
udpSocket.receive(packet);
|
udpSocket.receive(packet);
|
||||||
|
|
||||||
String json = new String(packet.getData(), 0, packet.getLength(), Charset.forName("UTF-8")).trim();
|
String json = new String(packet.getData(), 0, packet.getLength(), StandardCharsets.UTF_8).trim();
|
||||||
AckPacket ackPacket = JSON.parseObject(json, AckPacket.class);
|
AckPacket ackPacket = JSON.parseObject(json, AckPacket.class);
|
||||||
|
|
||||||
InetSocketAddress socketAddress = (InetSocketAddress) packet.getSocketAddress();
|
InetSocketAddress socketAddress = (InetSocketAddress) packet.getSocketAddress();
|
||||||
@ -669,7 +667,7 @@ public class PushService implements ApplicationContextAware, ApplicationListener
|
|||||||
|
|
||||||
long pushCost = System.currentTimeMillis() - udpSendTimeMap.get(ackKey);
|
long pushCost = System.currentTimeMillis() - udpSendTimeMap.get(ackKey);
|
||||||
|
|
||||||
Loggers.PUSH.info("received ack: {} from: {}:, cost: {} ms, unacked: {}, total push: {}",
|
Loggers.PUSH.info("received ack: {} from: {}:{}, cost: {} ms, unacked: {}, total push: {}",
|
||||||
json, ip, port, pushCost, ackMap.size(), totalPush);
|
json, ip, port, pushCost, ackMap.size(), totalPush);
|
||||||
|
|
||||||
pushCostMap.put(ackKey, pushCost);
|
pushCostMap.put(ackKey, pushCost);
|
||||||
|
Loading…
Reference in New Issue
Block a user