Release v2.2.0-beta6

This commit is contained in:
hongqiaowei
2021-06-30 14:47:33 +08:00
parent 24bb6cbf00
commit 82e6fe63ad
9 changed files with 41 additions and 24 deletions

View File

@@ -12,7 +12,7 @@
<groupId>com.fizzgate</groupId>
<artifactId>fizz-bootstrap</artifactId>
<version>2.2.0-beta5</version>
<version>2.2.0-beta6</version>
<properties>
<java.version>1.8</java.version>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>fizz-gateway-community</artifactId>
<groupId>com.fizzgate</groupId>
<version>2.2.0-beta5</version>
<version>2.2.0-beta6</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>fizz-gateway-community</artifactId>
<groupId>com.fizzgate</groupId>
<version>2.2.0-beta5</version>
<version>2.2.0-beta6</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -240,7 +240,8 @@ public class FlowStatSchedConfig extends SchedConfig {
rt.convertAndSend(flowStatSchedConfigProperties.getQueue(), msg).subscribe();
}
if (log.isDebugEnabled()) {
log.debug("report " + toDP19(timeWin) + " win10: " + msg);
String wt = 'w' + toDP19(timeWin);
log.debug("report " + wt + ": " + msg, LogService.BIZ_ID, wt);
}
}
}

View File

@@ -255,8 +255,15 @@ public class FlowControlFilter extends FizzWebFilter {
}
}
} else if (rateLimitConfig.type == ResourceRateLimitConfig.Type.IP && rateLimitConfig.path != null) {
} else if (rateLimitConfig.type == ResourceRateLimitConfig.Type.IP) {
if (rateLimitConfig.service == null && rateLimitConfig.path == null) {
} else if (rateLimitConfig.path == null) {
String ip = ResourceRateLimitConfig.getIp(prev);
if (ip == null) {
something4(resourceConfigs, null, rateLimitConfig.ip, null);
}
} else {
String ip = ResourceRateLimitConfig.getIp(prev);
if (ip == null) {
something4(resourceConfigs, null, rateLimitConfig.ip, null);
@@ -275,6 +282,7 @@ public class FlowControlFilter extends FizzWebFilter {
}
}
}
}
private void something4(List<ResourceConfig> resourceConfigs, String app, String ip, String service) {
String r = ResourceRateLimitConfig.buildResourceId(app, ip, null, service, null);

View File

@@ -98,11 +98,13 @@ public class ResourceRateLimitConfig {
}
public void setResource(String r) {
if (StringUtils.isNotBlank(r)) {
resource = r;
if (!resource.equals(NODE)) {
service = resource;
}
}
}
public void setType(byte t) {
type = t;
@@ -115,6 +117,12 @@ public class ResourceRateLimitConfig {
}
}
public void setService(String s) {
if (StringUtils.isNotBlank(s)) {
service = s;
}
}
public void setPath(String p) {
if (StringUtils.isNotBlank(p)) {
path = p;

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>fizz-gateway-community</artifactId>
<groupId>com.fizzgate</groupId>
<version>2.2.0-beta5</version>
<version>2.2.0-beta6</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>fizz-gateway-community</artifactId>
<groupId>com.fizzgate</groupId>
<version>2.2.0-beta5</version>
<version>2.2.0-beta6</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -31,7 +31,7 @@
<artifactId>fizz-gateway-community</artifactId>
<name>${project.artifactId}</name>
<description>fizz gateway community</description>
<version>2.2.0-beta5</version>
<version>2.2.0-beta6</version>
<packaging>pom</packaging>
<modules>
<module>fizz-common</module>