You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by tm...@apache.org on 2020/05/27 14:11:09 UTC
[sling-org-apache-sling-distribution-journal] branch master
updated: SLING-9474 - Bad partition when using an empty package topic
This is an automated email from the ASF dual-hosted git repository.
tmaret pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git
The following commit(s) were added to refs/heads/master by this push:
new 1047dc2 SLING-9474 - Bad partition when using an empty package topic
1047dc2 is described below
commit 1047dc2af3ecdac81b965c0e46007d65d4dfe059
Author: tmaret <tm...@adobe.com>
AuthorDate: Wed May 27 16:10:54 2020 +0200
SLING-9474 - Bad partition when using an empty package topic
---
.../sling/distribution/journal/impl/publisher/DiscoveryService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/distribution/journal/impl/publisher/DiscoveryService.java b/src/main/java/org/apache/sling/distribution/journal/impl/publisher/DiscoveryService.java
index 2cce5bb..e51bdb6 100644
--- a/src/main/java/org/apache/sling/distribution/journal/impl/publisher/DiscoveryService.java
+++ b/src/main/java/org/apache/sling/distribution/journal/impl/publisher/DiscoveryService.java
@@ -165,7 +165,7 @@ public class DiscoveryService implements Runnable {
SubscriberConfiguration subConfig = disMsg.getSubscriberConfiguration();
State subState = new State(subStateMsg.getPubAgentName(), subAgentId.getAgentId(), now, subStateMsg.getOffset(), subStateMsg.getRetries(), subConfig.getMaxRetries(), subConfig.getEditable());
viewManager.refreshState(subState);
- minOffset = Math.min(minOffset, subState.getOffset());
+ minOffset = Math.max(Math.min(minOffset, subState.getOffset()), 0);
}
pubQueueCacheService.seed(minOffset);
}