Skip to content

Commit 6941fa9

Browse files
William DowlingRadek Nezbeda
authored andcommitted
Fix for backlog reporting when draining proxy (#2)
1 parent 1d68c9f commit 6941fa9

4 files changed

Lines changed: 40 additions & 5 deletions

File tree

.mvn/extensions.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
3+
4+
<extension>
5+
<groupId>me.qoomon</groupId>
6+
<artifactId>maven-git-versioning-extension</artifactId>
7+
<version>7.4.0</version>
8+
</extension>
9+
10+
</extensions>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-7.0.0.xsd">
4+
5+
<refs considerTagsOnBranches="true">
6+
<ref type="branch">
7+
<pattern>.+</pattern>
8+
<version>${ref}-SNAPSHOT</version>
9+
</ref>
10+
11+
<ref type="tag">
12+
<pattern>.+</pattern>
13+
<version>${ref}</version>
14+
</ref>
15+
</refs>
16+
17+
<!-- optional fallback configuration in case of no matching ref configuration-->
18+
<rev>
19+
<version>${version}</version>
20+
</rev>
21+
22+
</configuration>

proxy/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<plugin>
8181
<groupId>com.cosium.code</groupId>
8282
<artifactId>git-code-format-maven-plugin</artifactId>
83-
<version>3.3</version>
83+
<version>4.3</version>
8484
<executions>
8585
<execution>
8686
<id>format-code</id>

proxy/src/main/java/com/wavefront/agent/queueing/QueueController.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,15 @@ private void printQueueStats() {
156156

157157
// 2. grab queue sizes (points/etc count)
158158
long actualWeight = 0L;
159-
for (QueueProcessor<T> task : processorTasks) {
160-
TaskQueue<T> taskQueue = task.getTaskQueue();
161-
if ((taskQueue != null) && (taskQueue.weight() != null)) {
162-
actualWeight += taskQueue.weight();
159+
if (backlog > 0) {
160+
for (QueueProcessor<T> task : processorTasks) {
161+
TaskQueue<T> taskQueue = task.getTaskQueue();
162+
if ((taskQueue != null) && (taskQueue.weight() != null)) {
163+
actualWeight += taskQueue.weight();
164+
}
163165
}
164166
}
167+
165168
long previousWeight = currentWeight.getAndSet(actualWeight);
166169

167170
// 4. print stats when there's backlog

0 commit comments

Comments
 (0)